Skip to content

Commit

Permalink
fix: flip order of tasks to use signing key first
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Phillip Kretzschmar committed May 4, 2023
1 parent 8a51ddd commit 85979f6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ jobs:
mkdir -p ~/.gradle/
echo "${{secrets.OSSRH_GPG_SECRET_KEY}}" > ~/.gradle/secring.gpg.b64
base64 -d ~/.gradle/secring.gpg.b64 > ~/.gradle/secring.gpg
- name: Publish package to Maven Central
# wraped the signing.password with single quotes as the password could contain special characters
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -Psigning.keyId=${{secrets.OSSRH_GPG_SECRET_KEY_ID}} -Psigning.password='${{secrets.OSSRH_GPG_SECRET_KEY_PASSWORD}}' -Psigning.secretKeyRingFile=$(echo ~/.gradle/secring.gpg) --warn --stacktrace
env:
MAVEN_USERNAME: ${{secrets.OSSRH_USERNAME}}
MAVEN_PASSWORD: ${{secrets.OSSRH_PASSWORD}}
- name: Publish to GitHub Packages
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
with:
arguments: publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish package to Maven Central
# wraped the signing.password with single quotes as the password could contain special characters
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -Psigning.keyId=${{secrets.OSSRH_GPG_SECRET_KEY_ID}} -Psigning.password='${{secrets.OSSRH_GPG_SECRET_KEY_PASSWORD}}' -Psigning.secretKeyRingFile=$(echo ~/.gradle/secring.gpg) --warn --stacktrace
env:
MAVEN_USERNAME: ${{secrets.OSSRH_USERNAME}}
MAVEN_PASSWORD: ${{secrets.OSSRH_PASSWORD}}

0 comments on commit 85979f6

Please sign in to comment.