Skip to content

Commit 219ac11

Browse files
author
Marvin Zhang
committed
chore: Enhance GPG key handling in GitHub Actions workflow
- Updated GPG key import process to decode the key from base64 before importing. - Added setup steps for GPG configuration, including loopback pinentry settings and restarting the gpg-agent. - Improved GPG signing support to ensure secure artifact signing during deployment.
1 parent 3a278b6 commit 219ac11

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/publish.yml

+9-1
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,18 @@ jobs:
7474
7575
- name: Import GPG key
7676
run: |
77-
echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --batch --import
77+
echo "${{ secrets.GPG_PRIVATE_KEY }}" | base64 -d | gpg --batch --import
78+
gpg --list-secret-keys --keyid-format LONG
7879
env:
7980
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
8081

82+
- name: Set up GPG
83+
run: |
84+
echo "allow-loopback-pinentry" >> ~/.gnupg/gpg-agent.conf
85+
echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf
86+
gpgconf --kill gpg-agent
87+
gpg-agent --daemon
88+
8189
- name: Set GPG_TTY
8290
run: echo "GPG_TTY=$(tty)" >> $GITHUB_ENV
8391

0 commit comments

Comments
 (0)