Skip to content

Commit b2fa00e

Browse files
author
Marvin Zhang
committed
chore: Import GPG key in GitHub Actions workflow for enhanced deployment security
- Added a step to import the GPG key directly from GitHub secrets, improving the security and efficiency of the deployment process. - This change streamlines the workflow by eliminating unnecessary intermediate steps in GPG key management.
1 parent 1ee6693 commit b2fa00e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.github/workflows/publish.yml

+2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ jobs:
4444
server-password: MAVEN_PASSWORD
4545
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
4646
gpg-passphrase: MAVEN_GPG_PASSPHRASE
47+
- name: Import GPG key
48+
run: echo "${{ secrets.GPG_PRIVATE_KEY }}" | base64 --decode | gpg --import --batch
4749
- name: Set version
4850
run: mvn versions:set -DnewVersion=${{ github.event.release.tag_name }}
4951
- name: Publish package

0 commit comments

Comments
 (0)