Skip to content

Commit da732c0

Browse files
authored
Add signatures for keyless signing (#394)
1 parent ea790b0 commit da732c0

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

.github/workflows/release.yml

+6
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
@@ -20,6 +24,8 @@ jobs:
2024
with:
2125
go-version-file: 'go.mod'
2226
cache: true
27+
- name: Install Cosign
28+
uses: sigstore/cosign-installer@v2
2329
- name: Run GoReleaser
2430
uses: goreleaser/goreleaser-action@v3
2531
with:

.goreleaser.yml

+13
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)