Skip to content

Commit

Permalink
Merge pull request #145 from Asana/jv-asana-update-github-actions-dep…
Browse files Browse the repository at this point in the history
…loy-maven

Update github actions publish to maven workflow to use gpg key
  • Loading branch information
jv-asana authored Aug 1, 2022
2 parents 7cef520 + fe5aaca commit 6d90685
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/publish-to-maven-central.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,19 @@ jobs:
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Publish package
run: mvn --batch-mode deploy
- id: install-secret-key
name: Install gpg secret key
run: |
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- id: publish-to-central
name: Publish to Central Repository
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
run: |
mvn \
--no-transfer-progress \
--batch-mode \
-Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} \
clean deploy

0 comments on commit 6d90685

Please sign in to comment.