-
Notifications
You must be signed in to change notification settings - Fork 4
/
.goreleaser.yaml
132 lines (120 loc) · 3.09 KB
/
.goreleaser.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
version: 1
before:
hooks:
- go mod tidy
- bash -c 'if [ -n "$(git --no-pager diff --exit-code go.mod go.sum)" ]; then exit 1; fi'
metadata:
mod_timestamp: "{{ .CommitTimestamp }}"
gomod:
proxy: true
report_sizes: true
builds:
- id: gateway
binary: gateway
env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64
- arm64
flags:
- -trimpath
kos:
- build: gateway
repository: ghcr.io/caddyserver/gateway
platforms:
- linux/amd64
- linux/arm64
tags:
- '{{.Tag}}'
# TODO: find a way to set the latest package tag, only when the release gets published on GitHub.
# We can trigger an action on release_published, but we then need to write a system that "pushes"
# the `latest` manifest.
- '{{ if not .Prerelease }}latest{{ end }}'
creation_time: '{{ .CommitTimestamp }}'
ko_data_creation_time: '{{ .CommitTimestamp }}'
sbom: 'spdx'
bare: true
preserve_import_paths: false
base_image: "gcr.io/distroless/static-debian12:nonroot"
labels:
org.opencontainers.image.description: "Kubernetes Gateway API implementation powered by Caddy"
org.opencontainers.image.licenses: Apache-2.0"
org.opencontainers.image.created: "{{ .Date }}"
org.opencontainers.image.name: "{{ .ProjectName }}"
org.opencontainers.image.revision: "{{ .FullCommit }}"
org.opencontainers.image.source: "{{ .GitURL }}"
org.opencontainers.image.version: "{{ .Version }}"
checksum:
algorithm: sha256
name_template: "checksums.txt"
sboms:
- artifacts: binary
cmd: syft
args:
- "${artifact}"
- "--file"
- "${document}"
- "--output"
- "spdx-json"
signs:
- cmd: cosign
artifacts: all
output: true
args:
- sign-blob
- --yes
- "--output-certificate=${certificate}"
- "--output-signature=${signature}"
- "${artifact}"
docker_signs:
- cmd: cosign
artifacts: all
output: true
args:
- sign
- --yes
- "${artifact}"
changelog:
use: github
sort: asc
filters:
exclude:
- '^chore(:|\()'
- '^perf(:|\()'
- '^readme(:|\()'
- '^refactor(:|\()'
- '^style(:|\()'
- '^tests?(:|\()'
- '^\w+\s+' # a hack to remove commit messages without colons thus don't correspond to a package
groups:
- title: Added
regexp: '^.*?feat(\(.+\))??!?:.+$'
order: 100
# Changed
# Deprecated
# Removed
- title: Fixed
regexp: '^.*?fix(\(.+\))??!?:.+$'
order: 500
- title: Security
regexp: '^.*?sec(\(.+\))??!?:.+$'
order: 600
- title: Dependencies
regexp: '^.*?chore\(deps\)!?:.+$'
order: 700
- title: Documentation
regexp: ^.*?docs?(\(.+\))??!?:.+$
order: 800
- title: CI
regexp: ^.*?(build|ci)(\(.+\))??!?:.+$
order: 900
- title: Other work
order: 9999
release:
draft: true
prerelease: auto
footer: |
**Full Changelog**: {{ .GitURL }}/compare/{{ .PreviousTag }}...{{ .Tag }}