Skip to content

Commit

Permalink
Add gpg signing to release GH action (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
vandyliu authored May 17, 2024
1 parent 37b1be9 commit aeafaa6
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,17 @@ jobs:
with:
go-version-file: 'go.mod'
cache: true
# Comment out for now until we have a GPG key to use for public release
# - name: Import GPG key
# uses: crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 # v6.1.0
# id: import_gpg
# with:
# gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
# passphrase: ${{ secrets.PASSPHRASE }}
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 # v6.1.0
id: import_gpg
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@5742e2a039330cbb23ebf35f046f814d4c6ff811 # v5.1.0
with:
args: release --clean ${{ env.SIGNING_DISABLED == 'true' && '--skip sign' }}
args: release --clean
env:
# GitHub sets the GITHUB_TOKEN secret automatically.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
SIGNING_DISABLED: 'true'

0 comments on commit aeafaa6

Please sign in to comment.