From 60c4f80d8a51627277582a0c8c9e8e8e7055bc5c Mon Sep 17 00:00:00 2001 From: Meron Brouwer Date: Tue, 17 Dec 2024 09:50:55 +0100 Subject: [PATCH] [bugfix] Reverted the release.yml to a version that did work --- .github/workflows/release.yml | 53 ++++++++++++++++------------------- 1 file changed, 24 insertions(+), 29 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 76c557de4..4e1a8f390 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,16 +19,10 @@ jobs: publish: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4.2.2 - - - name: Import GPG key - uses: crazy-max/ghaction-import-gpg@v6.2.0 - with: - gpg_private_key: ${{ secrets.OSSRH_GPG_SECRET_KEY }} - passphrase: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} + - uses: actions/checkout@v3.2.0 - name: Set up JDK 21 - uses: actions/setup-java@v4.5.0 + uses: actions/setup-java@v3.9.0 with: distribution: 'zulu' java-version: 21 @@ -37,35 +31,36 @@ jobs: server-password: MAVEN_CENTRAL_PASSWORD - name: Cache Maven packages - uses: actions/cache@v4.1.2 + uses: actions/cache@v3.0.11 with: path: ~/.m2 key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} restore-keys: ${{ runner.os }}-m2 - - name: Build Project for release & Deploy - run: xvfb-run mvn package deploy -P release -DskipTests -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} + - name: Import GPG key + uses: crazy-max/ghaction-import-gpg@v6 + with: + gpg_private_key: ${{ secrets.OSSRH_GPG_SECRET_KEY }} + + - name: Build Project for release + run: xvfb-run mvn package -P release -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} + + - name: Set up Apache Maven Central + uses: actions/setup-java@v3.9.0 + with: + distribution: 'zulu' + java-version: 21 + server-id: ossrh + server-username: MAVEN_CENTRAL_USERNAME + server-password: MAVEN_CENTRAL_PASSWORD + + - name: Deploy to the Maven Central Repository + run: mvn deploy -P release -DskipTests -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} -Dgpg.executable=gpg env: -# MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }} -# MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} + MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }} + MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} MAVEN_OPTS: "--add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED" -# - name: Set up Apache Maven Central -# uses: actions/setup-java@v4.5.0 -# with: -# distribution: 'zulu' -# java-version: 21 -# server-id: ossrh -# server-username: MAVEN_CENTRAL_USERNAME -# server-password: MAVEN_CENTRAL_PASSWORD -# -# - name: Deploy to the Maven Central Repository -# run: mvn deploy -P release -DskipTests -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} -Dgpg.executable=gpg -# env: -# MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }} -# MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} -# MAVEN_OPTS: "--add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED" - - name: Create GitHub Release uses: ncipollo/release-action@v1 with: