Skip to content

Commit eb49499

Browse files
committed
feat: sign release artifacts with cosign
Closes golangci#2462
1 parent 2691aac commit eb49499

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

.github/workflows/tag.yml

+6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
jobs:
88
release:
99
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write
12+
id-token: write # for cosign
1013
env:
1114
# https://github.com/actions/setup-go#supported-version-syntax
1215
# ex:
@@ -57,6 +60,9 @@ jobs:
5760
- name: Install snapcraft
5861
run: sudo snap install snapcraft --classic
5962

63+
- name: Set up cosign
64+
uses: sigstore/cosign-installer@v3
65+
6066
- name: Set up QEMU
6167
uses: docker/setup-qemu-action@v3
6268

.goreleaser.yml

+9
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,15 @@ release:
8787
8888
For key updates, see the [changelog](https://golangci-lint.run/product/changelog/#{{ .Major }}{{ .Minor }}{{ .Patch }}).
8989
90+
signs:
91+
- cmd: cosign
92+
args:
93+
- sign-blob
94+
- --bundle=${artifact}.cosign.bundle
95+
- --yes
96+
- ${artifact}
97+
artifacts: checksum
98+
9099
source:
91100
enabled: true
92101
name_template: '{{ .ProjectName }}-{{ .Version }}-source'

0 commit comments

Comments
 (0)