Skip to content

Commit 89dc01b

Browse files
authored
feat: add release artefact signing (#103)
Signed-off-by: Victoria Nadasdi <efertone@pm.me>
1 parent 1a63484 commit 89dc01b

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

.github/workflows/release.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ jobs:
2020
uses: actions/setup-go@v4
2121
with:
2222
go-version: stable
23+
- name: Import GPG key
24+
id: import_gpg
25+
uses: crazy-max/ghaction-import-gpg@v6
26+
with:
27+
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
28+
passphrase: ${{ secrets.GPG_PASSPHRASE }}
2329
- name: Run GoReleaser
2430
uses: goreleaser/goreleaser-action@v5
2531
with:
@@ -28,3 +34,4 @@ jobs:
2834
args: release --clean
2935
env:
3036
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}

.goreleaser.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,15 @@ changelog:
3636
exclude:
3737
- "^docs:"
3838
- "^test:"
39+
40+
signs:
41+
- artifacts: checksum
42+
cmd: gpg2
43+
args:
44+
- "--batch"
45+
- "-u"
46+
- "{{ .Env.GPG_FINGERPRINT }}"
47+
- "--output"
48+
- "${signature}"
49+
- "--detach-sign"
50+
- "${artifact}"

0 commit comments

Comments
 (0)