Skip to content

Commit

Permalink
add maven signing
Browse files Browse the repository at this point in the history
  • Loading branch information
bertramn committed Oct 17, 2023
1 parent 7583c32 commit 3f3fb78
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/maven-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: echo '${{ env.GPG_SIGNING_KEY_ID }}'
- run: echo "gh input version ${{ github.event.inputs.version }}"
- run: echo 'gpg fingerprint ${{ vars.GPG_SIGNING_KEY_ID }}'
- run: echo 'gh actor ${{ env.GITHUB_ACTOR }}'
- name: Setup GPG Signing Key
id: gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
fingerprint: 985E1B6AEBD22EBD083E37FD02F5F7011164C342 # ${{ env.GPG_SIGNING_KEY_ID }}
fingerprint: ${{ vars.GPG_SIGNING_KEY_ID }}
git_user_signingkey: true
git_commit_gpgsign: true
git_config_global: true
- run: gpg -K
- run: gpg -K --keyid-format LONG --with-keygrip --with-subkey-fingerprint
- run: git config -l --show-origin
- name: Setup Maven Central
uses: actions/setup-java@v3
with:
Expand All @@ -34,8 +38,10 @@ jobs:
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- run: cat ~/.m2/settings.xml
- name: Publish Package
run: mvn --batch-mode --no-transfer-progress clean deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

0 comments on commit 3f3fb78

Please sign in to comment.