Skip to content

Commit b245f12

Browse files
committed
ci: add signing key
1 parent 867fa7e commit b245f12

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

.github/workflows/release.yml

+11-2
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,25 @@ jobs:
1717
uses: actions/checkout@v2
1818
with:
1919
fetch-depth: 0
20+
2021
- name: Set up Go
2122
uses: actions/setup-go@v2
2223
with:
2324
go-version: 1.23.3
25+
2426
- name: Set up Docker Buildx
2527
uses: docker/setup-buildx-action@v2
28+
2629
- name: Log in to registry
2730
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
28-
- uses: cachix/install-nix-action@v22
31+
32+
- name: Import GPG key
33+
id: import_gpg
34+
uses: crazy-max/ghaction-import-gpg@v6
2935
with:
30-
nix_path: nixpkgs=channel:nixos-unstable
36+
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
37+
passphrase: ${{ secrets.PASSPHRASE }}
38+
3139
- name: Run GoReleaser
3240
uses: goreleaser/goreleaser-action@v2
3341
with:
@@ -38,3 +46,4 @@ jobs:
3846
GITHUB_TOKEN: ${{ secrets.PAT }}
3947
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
4048
BLUESKY_APP_PASSWORD: ${{ secrets.BLUESKY_APP_PASSWORD }}
49+
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}

.goreleaser.yml

+10
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,16 @@ binary_signs:
8282

8383
signs:
8484
- artifacts: checksum
85+
args:
86+
[
87+
"--batch",
88+
"-u",
89+
"{{ .Env.GPG_FINGERPRINT }}",
90+
"--output",
91+
"${signature}",
92+
"--detach-sign",
93+
"${artifact}",
94+
]
8595

8696
announce:
8797
bluesky:

0 commit comments

Comments
 (0)