From 81ef39b9d3e26f7d39285cc2a74ce4dec9836e3f Mon Sep 17 00:00:00 2001 From: Mike Wong Date: Wed, 9 Oct 2024 09:15:44 +0200 Subject: [PATCH] Update maven central publishing workflow --- .github/workflows/maven-central-tags.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/maven-central-tags.yml b/.github/workflows/maven-central-tags.yml index 679d18c..51c3398 100644 --- a/.github/workflows/maven-central-tags.yml +++ b/.github/workflows/maven-central-tags.yml @@ -23,17 +23,17 @@ jobs: SIGNING_KEY_ARMOR: ${{ secrets.MAVEN_SIGNING_KEY_ARMOR_BASE64 }} SIGNING_KEY_ID: ${{ secrets.MAVEN_SIGNING_KEY_ID }} SIGNING_KEY_PASSWORD: ${{ secrets.MAVEN_SIGNING_KEY_PASSPHRASE }} - MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }} - MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} + OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} + OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} run: | echo "Create .gpg key from secret" echo $SIGNING_KEY_ARMOR | base64 --decode > ./signingkey.asc gpg --quiet --output $GITHUB_WORKSPACE/signingkey.gpg --dearmor ./signingkey.asc - ./gradlew publish -Psigning.secretKeyRingFile=$GITHUB_WORKSPACE/signingkey.gpg -Psigning.password=$SIGNING_KEY_PASSWORD -Psigning.keyId=$SIGNING_KEY_ID -PmavenCentralUsername=$MAVEN_CENTRAL_USERNAME -PmavenCentralPassword=$MAVEN_CENTRAL_PASSWORD + ./gradlew publish -Psigning.secretKeyRingFile=$GITHUB_WORKSPACE/signingkey.gpg -Psigning.password=$SIGNING_KEY_PASSWORD -Psigning.keyId=$SIGNING_KEY_ID -PossrhUsername=$OSSRH_USERNAME -PossrhPassword=$OSSRH_PASSWORD - name: Close and release Sonatype repository if: ${{ success() }} env: - MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }} - MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} - run: ./gradlew closeAndReleaseRepository -PmavenCentralUsername=$MAVEN_CENTRAL_USERNAME -PmavenCentralPassword=$MAVEN_CENTRAL_PASSWORD + OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} + OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + run: ./gradlew closeAndReleaseRepository -PossrhUsername=$OSSRH_USERNAME -PossrhPassword=$OSSRH_PASSWORD