Skip to content

Commit bedc7f3

Browse files
Update GitHub Deploy config
1 parent e68adff commit bedc7f3

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,17 @@ jobs:
2525
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
2626
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
2727

28-
- name: Deploy with Maven
29-
run: mvn deploy -X -Psign-artifacts -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }}
28+
- name: Import GPG key
29+
run: |
30+
echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --batch --import
31+
echo "use-agent" >> ~/.gnupg/gpg.conf
32+
echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf
33+
echo "allow-loopback-pinentry" >> ~/.gnupg/gpg-agent.conf
34+
echo RELOADAGENT | gpg-connect-agent
35+
shell: bash
36+
37+
- name: Deploy with GPG signing
38+
run: mvn clean deploy -Psign-artifacts -Dgpg.passphrase="${{ secrets.GPG_PASSPHRASE }}"
3039
env:
3140
MAVEN_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
3241
MAVEN_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }}

0 commit comments

Comments
 (0)