-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathgoreleaser-simple.yaml
220 lines (200 loc) · 5.49 KB
/
goreleaser-simple.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
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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
# yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json
version: 2
variables:
main: ""
binary_name: ""
description: ""
maintainer: ""
homepage: "https://charm.sh/"
brew_commit_author_name: ""
brew_commit_author_email: ""
brew_owner: charmbracelet
aur_project_name: ""
includes:
- from_url:
url: charmbracelet/meta/main/notarize.yaml
gomod:
proxy: true
builds:
- binary: "{{ with .Var.binary_name }}{{ . }}{{ else }}{{ .ProjectName }}{{ end }}"
env:
- CGO_ENABLED=0
main: "{{ with .Var.main }}{{ . }}{{ else }}.{{ end }}"
ldflags: -s -w -X main.Version=v{{ .Version }} -X main.CommitSHA={{ .Commit }} -X main.CommitDate={{ .CommitDate }}
goos:
- linux
- darwin
- windows
- freebsd
- openbsd
- netbsd
goarch:
- amd64
- arm64
- "386"
- arm
goarm:
- "7"
ignore:
- goos: windows
goarch: arm64
- goos: windows
goarm: "7"
archives:
- format_overrides:
- goos: windows
format: zip
name_template: >-
{{ .ProjectName }}_
{{- .Version }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
wrap_in_directory: true
files:
- README*
- LICENSE*
nfpms:
- vendor: charmbracelet
homepage: "{{ .Var.homepage }}"
maintainer: "{{ .Var.maintainer }}"
description: "{{ .Var.description }}"
file_name_template: "{{ .ConventionalFileName }}"
license: MIT
formats:
- apk
- deb
- rpm
rpm:
signature:
key_file: '{{ if ne (index .Env "GPG_KEY_PATH") "" }}{{ .Env.GPG_KEY_PATH }}{{ else }}{{ end }}'
deb:
signature:
key_file: '{{ if ne (index .Env "GPG_KEY_PATH") "" }}{{ .Env.GPG_KEY_PATH }}{{ else }}{{ end }}'
furies:
- account: "{{ with .Env.FURY_TOKEN }}charmcli{{ else }}{{ end }}"
secret_name: FURY_TOKEN
brews:
- repository:
owner: "{{ .Var.brew_owner }}"
name: homebrew-tap
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
commit_author:
name: "{{ .Var.brew_commit_author_name }}"
email: "{{ .Var.brew_commit_author_email }}"
homepage: "{{ .Var.homepage }}"
description: "{{ .Var.description }}"
scoops:
- repository:
owner: "{{ .Var.brew_owner }}"
name: scoop-bucket
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
commit_author:
name: "{{ .Var.brew_commit_author_name }}"
email: "{{ .Var.brew_commit_author_email }}"
homepage: "{{ .Var.homepage }}"
description: "{{ .Var.description }}"
license: MIT
aurs:
- maintainers: ["{{ .Var.maintainer }}"]
description: "{{ .Var.description }}"
name: "{{ with .Var.aur_project_name }}{{ . }}{{ else }}{{ .ProjectName }}{{ end }}-bin"
homepage: "{{ .Var.homepage }}"
license: MIT
private_key: "{{ .Env.AUR_KEY }}"
git_url: "ssh://[email protected]/{{ with .Var.aur_project_name }}{{ . }}{{ else }}{{ .ProjectName }}{{ end }}-bin.git"
package: |-
cd "${srcdir}/{{ .ProjectName }}_${pkgver}_Linux_${CARCH}"
# bin
install -Dm755 "./{{ .ProjectName }}" "${pkgdir}/usr/bin/{{ .ProjectName }}"
# license
mkdir -p "${pkgdir}/usr/share/licenses/{{ .ProjectName }}/"
install -Dm644 ./LICENSE* "${pkgdir}/usr/share/licenses/{{ .ProjectName }}/"
# readme
mkdir -pv "${pkgdir}/usr/share/doc/{{ .ProjectName }}/"
install -Dm644 README* "${pkgdir}/usr/share/doc/{{ .ProjectName }}/"
nix:
- repository:
owner: "{{ .Var.brew_owner }}"
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
name: nur
homepage: "{{ .Var.homepage }}"
description: "{{ .Var.description }}"
license: mit
winget:
- publisher: charmbracelet
license: MIT
copyright: Charmbracelet, Inc
homepage: "{{ .Var.homepage }}"
short_description: "{{ .Var.description }}"
repository:
owner: "{{ .Var.brew_owner }}"
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
name: winget-pkgs
branch: "{{.ProjectName}}-{{.Version}}"
pull_request:
enabled: true
draft: false
check_boxes: true
base:
owner: microsoft
name: winget-pkgs
branch: master
checksum:
name_template: "checksums.txt"
source:
enabled: true
sboms:
- artifacts: archive
- id: source
artifacts: source
snapshot:
version_template: "{{ incpatch .Version }}-snapshot"
nightly:
version_template: "{{ incpatch .Version }}-devel"
changelog:
sort: asc
use: github
filters:
exclude:
- "^test:"
- "^chore"
- "merge conflict"
- Merge pull request
- Merge remote-tracking branch
- Merge branch
- go mod tidy
groups:
- title: Dependency updates
regexp: "^.*\\(deps\\)*:+.*$"
order: 300
- title: "New Features"
regexp: "^.*feat[(\\w)]*:+.*$"
order: 100
- title: "Bug fixes"
regexp: "^.*fix[(\\w)]*:+.*$"
order: 200
- title: "Documentation updates"
regexp: "^.*docs[(\\w)]*:+.*$"
order: 400
- title: Other work
order: 9999
signs:
- cmd: cosign
certificate: "${artifact}.pem"
args:
- sign-blob
- "--output-certificate=${certificate}"
- "--output-signature=${signature}"
- "${artifact}"
- "--yes"
artifacts: checksum
output: true
git:
tag_sort: semver
release:
prerelease: auto
footer:
from_url:
url: https://raw.githubusercontent.com/charmbracelet/meta/main/footer.md