Skip to content

Commit

Permalink
chore: rework release pipeline [no ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
a-h committed Mar 18, 2024
1 parent a587897 commit 94eb087
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 18 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: release
name: Release

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
workflow_dispatch:
- 'v*'

permissions:
contents: write
Expand All @@ -20,14 +19,15 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version: 1.22
cache: true
- uses: ko-build/[email protected]
- uses: sigstore/[email protected]
with:
cosign-release: v2.2.3
- uses: goreleaser/goreleaser-action@v5
with:
version: v1.24.0
args: release --clean --timeout 90m
args: release --clean
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
COSIGN_PASSWORD: '${{ secrets.COSIGN_PASSWORD }}'
Expand Down
55 changes: 41 additions & 14 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,24 @@ builds:
- windows
- darwin

checksum:
name_template: 'checksums.txt'

signs:
- id: checksums
cmd: cosign
stdin: '{{ .Env.COSIGN_PASSWORD }}'
output: true
artifacts: checksum
args:
- sign-blob
- --yes
- --key
- env://COSIGN_PRIVATE_KEY
- '--output-certificate=${certificate}'
- '--output-signature=${signature}'
- '${artifact}'

archives:
- format: tar.gz
name_template: >-
Expand All @@ -21,25 +39,34 @@ archives:
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
checksum:
name_template: 'checksums.txt'
kos:
- repository: ghcr.io/a-h/templ
platforms:
- linux/amd64
- linux/arm64
tags:
- latest
- '{{.Tag}}'
bare: true

docker_signs:
- cmd: cosign
artifacts: all
output: true
args:
- sign
- --yes
- --key
- env://COSIGN_PRIVATE_KEY
- '${artifact}'

snapshot:
name_template: "{{ incpatch .Version }}-next"

changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'

kos:
- repository: ghcr.io/a-h/templ
tags:
- 'v{{.Version}}'
- latest
bare: true
preserve_import_paths: false
sbom: none
platforms:
- linux/amd64
- linux/arm64

0 comments on commit 94eb087

Please sign in to comment.