Skip to content

Commit

Permalink
import gpg by bash
Browse files Browse the repository at this point in the history
  • Loading branch information
DQinYuan committed Apr 7, 2024
1 parent e8f4261 commit d7b67a7
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,12 @@ jobs:
gpg-private-key: ${{ secrets.GPG_SECRET }}
- name: debug settings.xml
run: cat /home/runner/.m2/settings.xml
- name: debug echo
run: echo $GPG_SECRET
env:
GPG_SECRET: ${{ secrets.GPG_SECRET }}
- name: Write gpg key
run: echo $GPG_SECRET >> /home/runner/private-key.txt
env:
GPG_SECRET: ${{ secrets.GPG_SECRET }}
- name: Import gpg key
run: gpg --import --batch /home/runner/private-key.txt
- name: Publish to Maven Central Repo
run: mvn clean deploy --batch-mode --activate-profiles deploy
run: |
echo $GPG_SECRET | gpg --import
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 d7b67a7

Please sign in to comment.