File tree Expand file tree Collapse file tree 2 files changed +26
-12
lines changed Expand file tree Collapse file tree 2 files changed +26
-12
lines changed Original file line number Diff line number Diff line change 4
4
push :
5
5
tags :
6
6
- ' *'
7
-
8
- permissions :
7
+ permissions :
9
8
contents : read
9
+ id-token : read
10
10
jobs :
11
11
goreleaser :
12
12
runs-on : ubuntu-latest
13
13
permissions :
14
14
contents : write # Needed for GoReleaser to create releases (tags, release notes, artifacts).
15
+ id-token : write # For cosign
15
16
steps :
16
- -
17
- name : Maximize build space
17
+ - name : Cosign install
18
+ uses : sigstore/cosign-installer@d7d6bc7722e3daa8354c50bcb52f4837da5e9b6a
19
+ - name : Maximize build space
18
20
uses : easimon/maximize-build-space@fc881a613ad2a34aca9c9624518214ebc21dfc0c
19
21
with :
20
22
root-reserve-mb : 32768
@@ -23,19 +25,15 @@ jobs:
23
25
remove-haskell : " true"
24
26
remove-codeql : " true"
25
27
remove-docker-images : " true"
26
- -
27
- name : Checkout
28
+ - name : Checkout
28
29
uses : actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
29
- -
30
- name : Unshallow
30
+ - name : Unshallow
31
31
run : git fetch --prune --unshallow
32
- -
33
- name : Set up Go
32
+ - name : Set up Go
34
33
uses : actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b
35
34
with :
36
35
go-version-file : go.mod
37
- -
38
- name : Run GoReleaser
36
+ - name : Run GoReleaser
39
37
uses : goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552
40
38
with :
41
39
distribution : goreleaser
Original file line number Diff line number Diff line change @@ -157,3 +157,19 @@ archives:
157
157
158
158
snapshot :
159
159
name_template : SNAPSHOT-{{ .Commit }}
160
+
161
+ signs :
162
+ - cmd : cosign
163
+ env :
164
+ - COSIGN_EXPERIMENTAL=1
165
+ signature : " ${artifact}.sig"
166
+ certificate : " ${artifact}.pem"
167
+ args :
168
+ - " sign-blob"
169
+ - " --oidc-issuer=https://token.actions.githubusercontent.com"
170
+ - " --output-certificate=${certificate}"
171
+ - " --output-signature=${signature}"
172
+ - " ${artifact}"
173
+ - " --yes"
174
+ artifacts : all
175
+ output : true
You can’t perform that action at this time.
0 commit comments