-
Notifications
You must be signed in to change notification settings - Fork 28
61 lines (53 loc) · 1.99 KB
/
release.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
60
61
name: Create flytekit-java release
on:
workflow_dispatch:
jobs:
build-snapshot:
runs-on: ubuntu-latest
name: flytekit-java release
steps:
- uses: actions/checkout@v2
with:
fetch: "0"
# https://docs.github.com/en/actions/guides/building-and-testing-java-with-maven#caching-dependencies
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-prepare-release-${{ hashFiles('pom.xml') }}
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ secrets.FLYTE_BOT_USERNAME }}
password: ${{ secrets.FLYTE_BOT_PAT }}
- 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: Setup git configuration
run: |
git config --global user.email ${{ github.actor }}@users.noreply.github.com
git config --global user.name ${{ github.actor }}
- name: Publish to MavenCentral
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
mvn --batch-mode release:prepare -DgenerateBackupPoms=false
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>"
mvn --batch-mode release:perform -Prelease -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 }}