Skip to content

Commit 94eb087

Browse files
committed
chore: rework release pipeline [no ci]
1 parent a587897 commit 94eb087

File tree

2 files changed

+45
-18
lines changed

2 files changed

+45
-18
lines changed

.github/workflows/release.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
name: release
1+
name: Release
22

33
on:
44
push:
55
tags:
6-
- 'v[0-9]+.[0-9]+.[0-9]+'
7-
workflow_dispatch:
6+
- 'v*'
87

98
permissions:
109
contents: write
@@ -20,14 +19,15 @@ jobs:
2019
- uses: actions/setup-go@v5
2120
with:
2221
go-version: 1.22
22+
cache: true
2323
- uses: ko-build/[email protected]
2424
- uses: sigstore/[email protected]
2525
with:
2626
cosign-release: v2.2.3
2727
- uses: goreleaser/goreleaser-action@v5
2828
with:
2929
version: v1.24.0
30-
args: release --clean --timeout 90m
30+
args: release --clean
3131
env:
3232
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
3333
COSIGN_PASSWORD: '${{ secrets.COSIGN_PASSWORD }}'

.goreleaser.yaml

+41-14
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,24 @@ builds:
1212
- windows
1313
- darwin
1414

15+
checksum:
16+
name_template: 'checksums.txt'
17+
18+
signs:
19+
- id: checksums
20+
cmd: cosign
21+
stdin: '{{ .Env.COSIGN_PASSWORD }}'
22+
output: true
23+
artifacts: checksum
24+
args:
25+
- sign-blob
26+
- --yes
27+
- --key
28+
- env://COSIGN_PRIVATE_KEY
29+
- '--output-certificate=${certificate}'
30+
- '--output-signature=${signature}'
31+
- '${artifact}'
32+
1533
archives:
1634
- format: tar.gz
1735
name_template: >-
@@ -21,25 +39,34 @@ archives:
2139
{{- else if eq .Arch "386" }}i386
2240
{{- else }}{{ .Arch }}{{ end }}
2341
{{- if .Arm }}v{{ .Arm }}{{ end }}
24-
checksum:
25-
name_template: 'checksums.txt'
42+
43+
kos:
44+
- repository: ghcr.io/a-h/templ
45+
platforms:
46+
- linux/amd64
47+
- linux/arm64
48+
tags:
49+
- latest
50+
- '{{.Tag}}'
51+
bare: true
52+
53+
docker_signs:
54+
- cmd: cosign
55+
artifacts: all
56+
output: true
57+
args:
58+
- sign
59+
- --yes
60+
- --key
61+
- env://COSIGN_PRIVATE_KEY
62+
- '${artifact}'
63+
2664
snapshot:
2765
name_template: "{{ incpatch .Version }}-next"
66+
2867
changelog:
2968
sort: asc
3069
filters:
3170
exclude:
3271
- '^docs:'
3372
- '^test:'
34-
35-
kos:
36-
- repository: ghcr.io/a-h/templ
37-
tags:
38-
- 'v{{.Version}}'
39-
- latest
40-
bare: true
41-
preserve_import_paths: false
42-
sbom: none
43-
platforms:
44-
- linux/amd64
45-
- linux/arm64

0 commit comments

Comments
 (0)