Skip to content

Commit 260f12d

Browse files
ricardozaninifjtirado
authored andcommitted
Add guardrails to GPG keys
Signed-off-by: fjtirado <[email protected]>
1 parent b9e382f commit 260f12d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
1919
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
2020
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
21+
MAVEN_GPG_FINGERPRINT: ${{ secrets.GPG_FINGERPRINT }}
2122

2223
steps:
2324
- uses: radcortez/project-metadata-action@main
@@ -43,6 +44,14 @@ jobs:
4344
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
4445
gpg-passphrase: MAVEN_GPG_PASSPHRASE
4546

47+
- name: GPG sanity check
48+
run: |
49+
gpg --list-secret-keys --keyid-format LONG
50+
echo "test" | gpg --batch --yes --pinentry-mode loopback \
51+
--passphrase "$MAVEN_GPG_PASSPHRASE" \
52+
--local-user "$MAVEN_GPG_FINGERPRINT" \
53+
--clearsign > /dev/null
54+
4655
- name: Configure Git author
4756
run: |
4857
git config --local user.email "[email protected]"

0 commit comments

Comments
 (0)