Skip to content

Commit 36eb1ac

Browse files
committed
Simplify release workflow
1 parent 0c22f34 commit 36eb1ac

1 file changed

Lines changed: 9 additions & 24 deletions

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,24 @@ env:
3131
JAVA_DISTRO: 'zulu'
3232

3333
jobs:
34-
version:
34+
release:
3535
runs-on: ubuntu-latest
3636
steps:
3737
- uses: actions/checkout@v3
38+
with:
39+
fetch-depth: 0
3840

39-
- name: Set up Java
41+
- name: Setup Java
4042
uses: actions/setup-java@v3
4143
with:
4244
java-version: ${{ env.JAVA_VERSION }}
4345
distribution: ${{ env.JAVA_DISTRO }}
4446
cache: maven
47+
server-id: central
48+
server-username: MAVEN_USERNAME
49+
server-password: MAVEN_CENTRAL_TOKEN
50+
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
51+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
4552

4653
- name: Set release version
4754
id: version
@@ -66,28 +73,6 @@ jobs:
6673
echo "NEXT_VERSION=$NEXT_VERSION" >> $GITHUB_ENV
6774
echo "PLAIN_VERSION=$PLAIN_VERSION" >> $GITHUB_ENV
6875
69-
release:
70-
needs: [ version ]
71-
runs-on: ubuntu-latest
72-
steps:
73-
- name: Checkout
74-
uses: actions/checkout@v3
75-
with:
76-
ref: ${{ env.BRANCH }}
77-
fetch-depth: 0
78-
79-
- name: Setup Java
80-
uses: actions/setup-java@v3
81-
with:
82-
java-version: ${{ env.JAVA_VERSION }}
83-
distribution: ${{ env.JAVA_DISTRO }}
84-
cache: maven
85-
server-id: central
86-
server-username: MAVEN_USERNAME
87-
server-password: MAVEN_CENTRAL_TOKEN
88-
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
89-
gpg-passphrase: MAVEN_GPG_PASSPHRASE
90-
9176
- name: Release to Maven Central
9277
env:
9378
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}

0 commit comments

Comments
 (0)