Skip to content

Commit aeeba52

Browse files
committed
test dry-run release to validate gpg (with keyname)
1 parent 29f0840 commit aeeba52

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

.github/workflows/maven-release.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,19 @@ jobs:
4343
- name: Verify GPG Key & Passphrase (Explicit Shell Import)
4444
run: |
4545
echo "$RAW_GPG_KEY" > private.key
46-
4746
gpg --batch --import private.key
4847
rm private.key
4948
50-
gpg --list-secret-keys --keyid-format LONG
49+
mkdir -p ~/.gnupg
50+
echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf
51+
echo "allow-loopback-pinentry" >> ~/.gnupg/gpg-agent.conf
52+
gpgconf --kill gpg-agent
5153
5254
mvn clean verify -B -ntp \
5355
-DskipTests=true \
5456
-Dmaven.javadoc.skip=true \
55-
-Dgpg.passphrase="$GPG_PASSPHRASE"
57+
-Dgpg.passphrase="$GPG_PASSPHRASE" \
58+
-Dgpg.keyname="95BCB1665C76C3A6"
5659
env:
5760
RAW_GPG_KEY: ${{ secrets.SONATYPE_GPG_PRIVATE_KEY }}
5861
GPG_PASSPHRASE: ${{ secrets.SONATYPE_GPG_PASSPHRASE }}

0 commit comments

Comments
 (0)