Skip to content

Commit

Permalink
Change how the release manages secrets
Browse files Browse the repository at this point in the history
We now follow the example laid out in https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#publishing-using-apache-maven

Using environment variables also appear to be preferred by maven-gpg-plugin: https://maven.apache.org/plugins/maven-gpg-plugin/usage.html
  • Loading branch information
chrisvest committed Jun 15, 2024
1 parent 6772412 commit ef8b98a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
distribution: 'zulu'
java-version: '11'
server-id: 'ossrh'
server-username: ${{ secrets.SONATYPE_USERNAME }}
server-password: ${{ secrets.SONATYPE_PASSWORD }}
server-username: SONATYPE_USERNAME
server-password: SONATYPE_TOKEN
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE

- name: Configure Git
run: |
Expand All @@ -30,6 +30,10 @@ jobs:
- name: Verifying build
run: ./mvnw clean deploy -P release -B -DskipTests
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_TOKEN: ${{ secrets.SONATYPE_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

- name: Push pom updates and tags
run: |
Expand Down

0 comments on commit ef8b98a

Please sign in to comment.