Skip to content

Commit b3d66f4

Browse files
committed
Add signatures for keyless signing
1 parent 7c85ba6 commit b3d66f4

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
tags:
88
- v*.*.*
99

10+
permissions:
11+
contents: write
12+
id-token: write
13+
1014
jobs:
1115
goreleaser:
1216
runs-on: ubuntu-latest
@@ -17,6 +21,8 @@ jobs:
1721
uses: actions/setup-go@v3
1822
with:
1923
go-version-file: 'go.mod'
24+
- name: Install Cosign
25+
uses: sigstore/cosign-installer@v2
2026
- name: Run GoReleaser
2127
uses: goreleaser/goreleaser-action@v3
2228
with:

.goreleaser.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,19 @@ changelog:
2222
skip: true
2323
checksum:
2424
name_template: 'checksums.txt'
25+
signs:
26+
- cmd: cosign
27+
env:
28+
- COSIGN_EXPERIMENTAL=1
29+
signature: '${artifact}.keyless.sig'
30+
certificate: '${artifact}.pem'
31+
output: true
32+
artifacts: checksum
33+
args:
34+
- sign-blob
35+
- '--output-certificate=${certificate}'
36+
- '--output-signature=${signature}'
37+
- '${artifact}'
2538
release:
2639
github:
2740
owner: terraform-linters

0 commit comments

Comments
 (0)