Skip to content

Commit

Permalink
feat: add release artefact signing (#103)
Browse files Browse the repository at this point in the history
Signed-off-by: Victoria Nadasdi <[email protected]>
  • Loading branch information
yitsushi authored Jan 7, 2024
1 parent 1a63484 commit 89dc01b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ jobs:
uses: actions/setup-go@v4
with:
go-version: stable
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
Expand All @@ -28,3 +34,4 @@ jobs:
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
12 changes: 12 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,15 @@ changelog:
exclude:
- "^docs:"
- "^test:"

signs:
- artifacts: checksum
cmd: gpg2
args:
- "--batch"
- "-u"
- "{{ .Env.GPG_FINGERPRINT }}"
- "--output"
- "${signature}"
- "--detach-sign"
- "${artifact}"

0 comments on commit 89dc01b

Please sign in to comment.