Skip to content

Commit 2fc6d74

Browse files
committed
ci: add signing key
fix: signing for binaries ci: change to key id ci: change gpg version debug debug debug fix: signing cleanup ci
1 parent 867fa7e commit 2fc6d74

File tree

3 files changed

+38
-3
lines changed

3 files changed

+38
-3
lines changed

.github/workflows/release.yml

+12-2
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,26 @@ 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+
trust_level: 5
39+
3140
- name: Run GoReleaser
3241
uses: goreleaser/goreleaser-action@v2
3342
with:
@@ -38,3 +47,4 @@ jobs:
3847
GITHUB_TOKEN: ${{ secrets.PAT }}
3948
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
4049
BLUESKY_APP_PASSWORD: ${{ secrets.BLUESKY_APP_PASSWORD }}
50+
GPG_KEYID: ${{ steps.import_gpg.outputs.keyid }}

.goreleaser.yml

+22-1
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,33 @@ checksum:
7878
name_template: "checksums.txt"
7979

8080
binary_signs:
81-
- {}
81+
- cmd: gpg2
82+
args:
83+
[
84+
"-u",
85+
"{{ .Env.GPG_KEYID }}",
86+
"--output",
87+
"${signature}",
88+
"--detach-sign",
89+
"${artifact}",
90+
]
8291

8392
signs:
8493
- artifacts: checksum
94+
cmd: gpg2
95+
args:
96+
[
97+
"--batch",
98+
"-u",
99+
"{{ .Env.GPG_KEYID }}",
100+
"--output",
101+
"${signature}",
102+
"--detach-sign",
103+
"${artifact}",
104+
]
85105

86106
announce:
87107
bluesky:
88108
enabled: true
89109
username: "me.felixwie.com"
110+
message_template: "📜 {{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}"

Taskfile.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,7 @@ tasks:
1515
run:
1616
desc: Run application
1717
cmd: go run main.go {{ .CLI_ARGS }}
18+
19+
release:
20+
desc: Run GoReleaser
21+
cmd: goreleaser release --snapshot --clean

0 commit comments

Comments
 (0)