Skip to content

Commit

Permalink
Specify GPG_PASSPHRASE on mvn deploys.
Browse files Browse the repository at this point in the history
  • Loading branch information
YaytayAtWork committed Jun 28, 2022
1 parent 8b5c7db commit d25fde2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,12 @@ jobs:

- name: Deploy with Maven to GitHub Packages
env:
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
GITHUB_ACTOR: ${{ github.actor }} # GITHUB_TOKEN is the default env for the password
GITHUB_TOKEN: ${{ github.token }} # GITHUB_TOKEN is the default env for the password
run: |
mvn -P ci-cd -B \
mvn -B \
-P ci-cd \
-DskipTests \
-DaltDeploymentRepository=github::default::https://maven.pkg.github.com/$GITHUB_REPOSITORY \
--file pom.xml \
Expand All @@ -76,10 +78,12 @@ jobs:

- name: Deploy with Maven to Maven Central
env:
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
run: |
mvn -P ci-cd -B \
mvn -B \
-P ci-cd \
-DskipTests \
"-Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }}" \
-DaltDeploymentRepository=ossrh::default::https://oss.sonatype.org/service/local/staging/deploy/maven2/ \
Expand Down

0 comments on commit d25fde2

Please sign in to comment.