-
Notifications
You must be signed in to change notification settings - Fork 105
Expand file tree
/
Copy path.goreleaser.yml
More file actions
189 lines (166 loc) · 4.59 KB
/
Copy path.goreleaser.yml
File metadata and controls
189 lines (166 loc) · 4.59 KB
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
# GoReleaser configuration for Pup
# Builds multi-platform binaries with SBOMs and signatures
version: 2
before:
hooks:
# Run tests before building
- go test ./...
# Ensure go.mod is tidy
- go mod tidy
builds:
- id: pup
binary: pup
main: .
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
- arm
goarm:
- "7"
ignore:
# Windows ARM is not commonly used
- goos: windows
goarch: arm64
- goos: windows
goarch: arm
ldflags:
- -s -w
- -X github.com/DataDog/pup/internal/version.Version={{.Version}}
- -X github.com/DataDog/pup/internal/version.Commit={{.Commit}}
- -X github.com/DataDog/pup/internal/version.Date={{.Date}}
- -X github.com/DataDog/pup/internal/version.BuiltBy=goreleaser
archives:
- id: pup
name_template: >-
{{ .ProjectName }}_
{{- .Version }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
files:
- LICENSE
- README.md
- CHANGELOG.md
- docs/*
# Source archive
source:
enabled: true
name_template: "{{ .ProjectName }}_{{ .Version }}_source"
format: tar.gz
# Generate checksums
checksum:
name_template: "{{ .ProjectName }}_{{ .Version }}_checksums.txt"
algorithm: sha256
# Generate SBOM (Software Bill of Materials)
sboms:
- id: pup-sbom
artifacts: archive
documents:
- "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}.sbom.json"
# Sign artifacts with cosign
signs:
- cmd: cosign
artifacts: all
output: true
args:
- sign-blob
- "--output-signature=${signature}"
- "--output-certificate=${certificate}"
- "${artifact}"
- --yes
# GitHub Release
release:
github:
owner: DataDog
name: pup
draft: false
prerelease: auto
mode: append
name_template: "Release {{ .Version }}"
header: |
## Pup {{ .Version }}
### Installation
Download the appropriate binary for your platform from the assets below.
```bash
# Linux (x86_64)
curl -L https://github.com/DataDog/pup/releases/download/{{ .Tag }}/pup_{{ .Version }}_Linux_x86_64.tar.gz | tar xz
# macOS (Apple Silicon)
curl -L https://github.com/DataDog/pup/releases/download/{{ .Tag }}/pup_{{ .Version }}_Darwin_arm64.tar.gz | tar xz
# macOS (Intel)
curl -L https://github.com/DataDog/pup/releases/download/{{ .Tag }}/pup_{{ .Version }}_Darwin_x86_64.tar.gz | tar xz
```
### Verifying Signatures
All artifacts are signed with cosign. To verify:
```bash
cosign verify-blob \
--certificate pup_{{ .Version }}_Linux_x86_64.tar.gz.pem \
--signature pup_{{ .Version }}_Linux_x86_64.tar.gz.sig \
pup_{{ .Version }}_Linux_x86_64.tar.gz
```
footer: |
### What's Changed
See the [CHANGELOG](https://github.com/DataDog/pup/blob/{{ .Tag }}/CHANGELOG.md) for details.
**Full Changelog**: https://github.com/DataDog/pup/compare/{{ .PreviousTag }}...{{ .Tag }}
changelog:
use: github
sort: asc
abbrev: 0
filters:
exclude:
- "^docs:"
- "^test:"
- "^chore:"
- typo
groups:
- title: "🚀 Features"
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
order: 0
- title: "🐛 Bug Fixes"
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
order: 1
- title: "🔒 Security"
regexp: '^.*?sec(\([[:word:]]+\))??!?:.+$'
order: 2
- title: "📚 Documentation"
regexp: '^.*?docs(\([[:word:]]+\))??!?:.+$'
order: 3
- title: "Other Changes"
order: 999
# Homebrew Tap
brews:
- name: pup
repository:
owner: DataDog
name: homebrew-pack
token: "{{ .Env.HOMEBREW_TAP_TOKEN }}"
homepage: https://github.com/DataDog/pup
description: "Datadog API CLI - OAuth2 + API key authentication for Datadog APIs"
license: Apache-2.0
directory: Formula
commit_author:
name: goreleaserbot
email: bot@goreleaser.com
commit_msg_template: "chore(formula): update {{ .ProjectName }} to {{ .Tag }}"
install: |
bin.install "pup"
test: |
system "#{bin}/pup", "version"
dependencies:
- name: go
type: optional
extra_install: |
# Generate shell completions
bash_completion.install "completions/pup.bash" => "pup"
zsh_completion.install "completions/pup.zsh" => "_pup"
fish_completion.install "completions/pup.fish"
# Announce releases
announce:
skip: false