Skip to content

Commit 6aa491e

Browse files
author
Marvin Zhang
committed
chore: Simplify GPG key import process in GitHub Actions workflow
- Streamlined the GPG key import step by removing unnecessary file creation and cleanup commands. - Enhanced efficiency by directly importing the GPG key from GitHub secrets without intermediate steps.
1 parent 03c19fc commit 6aa491e

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

.github/workflows/publish.yml

+1-11
Original file line numberDiff line numberDiff line change
@@ -74,17 +74,7 @@ jobs:
7474
7575
- name: Import GPG key
7676
run: |
77-
# Create GPG directory
78-
mkdir -p ~/.gnupg/
79-
chmod 700 ~/.gnupg/
80-
81-
# Write key to file first
82-
echo "${{ secrets.GPG_PRIVATE_KEY }}" > ~/private-key.asc
83-
gpg --batch --import ~/private-key.asc
84-
rm ~/private-key.asc # Clean up
85-
86-
# Verify the key was imported
87-
gpg --list-secret-keys --keyid-format LONG
77+
echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --batch --import
8878
env:
8979
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
9080

0 commit comments

Comments
 (0)