Skip to content

Commit 1a07a0d

Browse files
author
Tim Evdokimov
committed
github action for sonatype publishing - gpg fix
1 parent 620584c commit 1a07a0d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ jobs:
1919
USERNAME: ${{ github.actor }}
2020
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
2121
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
22+
# Passphrase for signing (sbt-pgp reads this)
23+
PGP_PASSPHRASE: ${{ secrets.GPG_PASS }}
2224
# gpg on headless runners
23-
GPG_TTY: /dev/pts/0
25+
2426
steps:
2527
- name: Checkout
2628
# sbt-release needs tags and full history
@@ -56,7 +58,10 @@ jobs:
5658
chmod 700 ~/.gnupg
5759
echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf
5860
echo "use-agent" >> ~/.gnupg/gpg.conf
61+
echo "allow-loopback-pinentry" >> ~/.gnupg/gpg-agent.conf
5962
printf "%s" "${GPG_SECRET}" | gpg --batch --import
63+
# reload agent to pick up allow-loopback-pinentry
64+
gpgconf --kill gpg-agent || true
6065
env:
6166
GPG_SECRET: ${{ secrets.GPG_SECRET }}
6267

0 commit comments

Comments
 (0)