Skip to content

Commit

Permalink
fix: sign published tags and commits (#16)
Browse files Browse the repository at this point in the history
Sign published branch (`latest`) and tags (`v1`, `v1.0`, and `v1.0.0`)
and show "Verified" badge on the GitHub. The key is from the
maintainer's registered GPG key.
  • Loading branch information
ueokande authored Jul 23, 2024
1 parent 6bb9647 commit 9ae1f08
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,13 @@ jobs:
full_version: ${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }}
tag_name: ${{ steps.release.outputs.tag_name }}
run: |
gpg --allow-secret-key-import --import <<< "${{ secrets.PRIVATE_SIGNING_KEY }}"
git remote set-url origin https://github-actions:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git config commit.gpgsign true
git config tag.gpgsign true
git config --global user.name ueokande
git config --global user.email [email protected]
git config --global user.signingkey 7F94715D031FDE95
git add .
git commit --allow-empty --message "Release v${full_version} at ${GITHUB_SHA}"
Expand Down

0 comments on commit 9ae1f08

Please sign in to comment.