Skip to content

Commit

Permalink
git action import gpg
Browse files Browse the repository at this point in the history
  • Loading branch information
DQinYuan committed Apr 7, 2024
1 parent c4ea82a commit 7a40a00
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,16 @@ jobs:
server-username: 'OSSRH_USER'
server-password: 'OSSRH_PASSWORD'
gpg-passphrase: 'GPG_PASSWORD'
gpg-private-key: ${{ secrets.GPG_SECRET }}
- name: debug settings.xml
run: cat /home/runner/.m2/settings.xml
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_SECRET }}
passphrase: ${{ secrets.GPG_PASSWORD }}
- name: Publish to Maven Central Repo
run: |
echo -n "$GPG_SECRET" | base64 --decode | gpg --import
mvn clean deploy --batch-mode --activate-profiles deploy
run: mvn clean deploy --batch-mode --activate-profiles deploy
env:
OSSRH_USER: ${{ secrets.OSSRH_USER }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
GPG_SECRET: ${{ secrets.GPG_SECRET }}

0 comments on commit 7a40a00

Please sign in to comment.