Skip to content

Commit 486b15b

Browse files
committed
Add signatures for keyless signing
1 parent 7a0aff4 commit 486b15b

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

.github/workflows/goreleaser.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ jobs:
2323
- name: Run GoReleaser
2424
uses: goreleaser/goreleaser-action@v3
2525
with:
26-
version: v0.178.0
26+
version: v1.12.3
2727
args: check

.github/workflows/release.yml

Lines changed: 7 additions & 1 deletion
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
@@ -19,10 +23,12 @@ jobs:
1923
uses: actions/setup-go@v3
2024
with:
2125
go-version-file: 'go.mod'
26+
- name: Install Cosign
27+
uses: sigstore/cosign-installer@v2
2228
- name: Run GoReleaser
2329
uses: goreleaser/goreleaser-action@v3
2430
with:
25-
version: v0.178.0
31+
version: v1.12.3
2632
args: release --rm-dist
2733
env:
2834
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.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)