Skip to content

Commit b42ac71

Browse files
authored
Sign Linux packages (#38)
1 parent 0a69dfa commit b42ac71

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

.github/workflows/release.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,16 @@ jobs:
2626
with:
2727
go-version-file: "go.mod"
2828
cache: true
29+
- name: Import GPG key
30+
uses: crazy-max/ghaction-import-gpg@v6
31+
id: import_gpg
32+
with:
33+
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
34+
passphrase: ${{ secrets.GPG_PASSPHRASE }}
2935
- name: Run GoReleaser
3036
uses: goreleaser/goreleaser-action@v5
3137
with:
3238
args: release --clean
3339
env:
3440
GITHUB_TOKEN: ${{ secrets.CLI_RELEASE }}
41+
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}

.goreleaser.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ nfpms:
5959
- deb
6060
- rpm
6161

62+
signs:
63+
- artifacts: package
64+
args: ["-u", "{{ .Env.GPG_FINGERPRINT }}", "--output", "${signature}", "--detach-sign", "${artifact}"]
65+
6266
brews:
6367
- name: stackit-cli
6468
repository:

0 commit comments

Comments
 (0)