From 47b9f9c76e3a3b4a50f41e0490e4873e89a704de Mon Sep 17 00:00:00 2001 From: Andres Almiray Date: Wed, 3 May 2023 09:10:01 +0200 Subject: [PATCH] Simplify release workflow --- .github/workflows/release.yml | 33 +++++++++------------------------ 1 file changed, 9 insertions(+), 24 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0dee36b..fe4ea0c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,17 +31,24 @@ env: JAVA_DISTRO: 'zulu' jobs: - version: + release: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + with: + fetch-depth: 0 - - name: Set up Java + - name: Setup Java uses: actions/setup-java@v3 with: java-version: ${{ env.JAVA_VERSION }} distribution: ${{ env.JAVA_DISTRO }} cache: maven + server-id: central + server-username: MAVEN_USERNAME + server-password: MAVEN_CENTRAL_TOKEN + gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} + gpg-passphrase: MAVEN_GPG_PASSPHRASE - name: Set release version id: version @@ -66,28 +73,6 @@ jobs: echo "NEXT_VERSION=$NEXT_VERSION" >> $GITHUB_ENV echo "PLAIN_VERSION=$PLAIN_VERSION" >> $GITHUB_ENV - release: - needs: [ version ] - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - ref: ${{ env.BRANCH }} - fetch-depth: 0 - - - name: Setup Java - uses: actions/setup-java@v3 - with: - java-version: ${{ env.JAVA_VERSION }} - distribution: ${{ env.JAVA_DISTRO }} - cache: maven - server-id: central - server-username: MAVEN_USERNAME - server-password: MAVEN_CENTRAL_TOKEN - gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} - gpg-passphrase: MAVEN_GPG_PASSPHRASE - - name: Release to Maven Central env: MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}