-
Notifications
You must be signed in to change notification settings - Fork 28
59 lines (51 loc) · 1.78 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: flytekit-java build
on:
push:
branches: [master]
pull_request:
jobs:
build-snapshot:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-prepare-release-${{ hashFiles('pom.xml') }}
- name: Setup JDK 11
uses: actions/setup-java@v2
with:
java-version: 11.0
distribution: 'adopt'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.SONATYPE_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Log in to Docker Hub
if: ${{ github.ref == 'refs/heads/master' }}
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ secrets.FLYTE_BOT_USERNAME }}
password: ${{ secrets.FLYTE_BOT_PAT }}
- name: Verify with Maven
if: ${{ github.ref != 'refs/heads/master' }}
run: mvn --batch-mode verify -Pci
- name: Release snapshot with Maven
if: ${{ github.ref == 'refs/heads/master' }}
run: |
export GPG_TTY=$(tty)
export DISPLAY=:0
gpg --version
gpg --list-secret-keys --keyid-format LONG
echo "test" | gpg --batch --clearsign --pinentry-mode loopback || true
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>"
mvn --batch-mode deploy -Pci
env:
CI: true
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.SONATYPE_PASSPHRASE }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}