1# yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json
2# vim: set ts=2 sw=2 tw=0 fo=jcroql
3version: 2
4
5project_name: crush
6
7includes:
8 - from_url:
9 url: charmbracelet/meta/main/notarize.yaml
10
11metadata:
12 mod_timestamp: "{{ .CommitTimestamp }}"
13 license: "FSL-1.1-MIT"
14 homepage: "https://charm.sh/crush"
15 description: "A powerful terminal-based AI assistant for developers, providing intelligent coding assistance directly in your terminal."
16 full_description: "A powerful terminal-based AI assistant for developers, providing intelligent coding assistance directly in your terminal."
17 maintainers:
18 - "kujtimiihoxha <kujtim@charm.sh>"
19 - "caarlos0 <carlos@charm.sh>" # for aur
20
21nightly:
22 publish_release: true
23 keep_single_release: true
24 version_template: "{{ incminor .Version }}-nightly"
25
26snapshot:
27 version_template: "0.0.0-{{ .Timestamp }}"
28
29before:
30 hooks:
31 - go mod tidy
32 - rm -rf completions
33 - mkdir completions
34 - rm -rf manpages
35 - mkdir manpages
36 - sh -c 'go run . completion bash >./completions/crush.bash'
37 - sh -c 'go run . completion zsh >./completions/crush.zsh'
38 - sh -c 'go run . completion fish >./completions/crush.fish'
39 - sh -c 'go run . man | gzip -c >./manpages/crush.1.gz'
40
41# gomod:
42# proxy: true
43
44builds:
45 - env:
46 - CGO_ENABLED=0
47 - GOEXPERIMENT=greenteagc
48 goos:
49 - linux
50 - darwin
51 - windows
52 - freebsd
53 - openbsd
54 - netbsd
55 - android
56 goarch:
57 - amd64
58 - arm64
59 - "386"
60 - arm
61 goarm:
62 - "7"
63 ignore:
64 - goos: android
65 goarch: amd64
66 - goos: android
67 goarch: arm
68 - goos: android
69 goarch: "386"
70 ldflags:
71 - -s -w -X github.com/charmbracelet/crush/internal/version.Version={{.Version}}
72
73archives:
74 - name_template: >-
75 crush_
76 {{- .Version }}_
77 {{- title .Os }}_
78 {{- if eq .Arch "amd64" }}x86_64
79 {{- else if eq .Arch "386" }}i386
80 {{- else }}{{ .Arch }}{{ end }}
81 {{- with .Arm}}v{{ . }}{{ end }}
82 wrap_in_directory: true
83 files:
84 - README*
85 - LICENSE*
86 - manpages/*
87 - completions/*
88 format_overrides:
89 - goos: windows
90 formats: [zip]
91
92checksum:
93 name_template: "checksums.txt"
94
95aur_sources:
96 - private_key: "{{ .Env.AUR_KEY }}"
97 git_url: "ssh://aur@aur.archlinux.org/crush.git"
98 commit_author:
99 name: "Charm"
100 email: "charmcli@users.noreply.github.com"
101 makedepends:
102 - go
103 - git
104 prepare: |-
105 go mod download
106 build: |-
107 mkdir completions
108 mkdir manpages
109 export CGO_CPPFLAGS="${CPPFLAGS}"
110 export CGO_CFLAGS="${CFLAGS}"
111 export CGO_CXXFLAGS="${CXXFLAGS}"
112 export CGO_LDFLAGS="${LDFLAGS}"
113 export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
114 go build -ldflags="-w -s -buildid='' -linkmode=external -X main.version=v${pkgver}" .
115 ./crush completion bash >./completions/crush.bash
116 ./crush completion zsh >./completions/crush.zsh
117 ./crush completion fish >./completions/crush.fish
118 ./crush man | gzip -c >./manpages/crush.1.gz
119 package: |-
120 # bin
121 install -Dm755 "./crush" "${pkgdir}/usr/bin/crush"
122 # license
123 mkdir -p "${pkgdir}/usr/share/licenses/crush/"
124 install -Dm644 ./LICENSE* "${pkgdir}/usr/share/licenses/crush/"
125 # completions
126 mkdir -p "${pkgdir}/usr/share/bash-completion/completions/"
127 mkdir -p "${pkgdir}/usr/share/zsh/site-functions/"
128 mkdir -p "${pkgdir}/usr/share/fish/vendor_completions.d/"
129 install -Dm644 "./completions/crush.bash" "${pkgdir}/usr/share/bash-completion/completions/crush"
130 install -Dm644 "./completions/crush.zsh" "${pkgdir}/usr/share/zsh/site-functions/_crush"
131 install -Dm644 "./completions/crush.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/crush.fish"
132 # man pages
133 install -Dm644 "./manpages/crush.1.gz" "${pkgdir}/usr/share/man/man1/crush.1.gz"
134 # readme
135 mkdir -pv "${pkgdir}/usr/share/doc/crush/"
136 install -Dm644 README* "${pkgdir}/usr/share/doc/crush/"
137
138aurs:
139 - private_key: "{{ .Env.AUR_KEY }}"
140 git_url: "ssh://aur@aur.archlinux.org/crush-bin.git"
141 commit_author:
142 name: "Charm"
143 email: "charmcli@users.noreply.github.com"
144 provides:
145 - crush
146 conflicts:
147 - crush
148 package: |-
149 cd "${srcdir}/crush_${pkgver}_Linux_${CARCH}"
150 # bin
151 install -Dm755 "./crush" "${pkgdir}/usr/bin/crush"
152 # license
153 mkdir -p "${pkgdir}/usr/share/licenses/crush/"
154 install -Dm644 ./LICENSE* "${pkgdir}/usr/share/licenses/crush/"
155 # completions
156 mkdir -p "${pkgdir}/usr/share/bash-completion/completions/"
157 mkdir -p "${pkgdir}/usr/share/zsh/site-functions/"
158 mkdir -p "${pkgdir}/usr/share/fish/vendor_completions.d/"
159 install -Dm644 "./completions/crush.bash" "${pkgdir}/usr/share/bash-completion/completions/crush"
160 install -Dm644 "./completions/crush.zsh" "${pkgdir}/usr/share/zsh/site-functions/_crush"
161 install -Dm644 "./completions/crush.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/crush.fish"
162 # man pages
163 install -Dm644 "./manpages/crush.1.gz" "${pkgdir}/usr/share/man/man1/crush.1.gz"
164 # readme
165 mkdir -pv "${pkgdir}/usr/share/doc/crush/"
166 install -Dm644 README* "${pkgdir}/usr/share/doc/crush/"
167
168furies:
169 - disable: "{{ .IsNightly }}"
170 account: "{{ with .Env.FURY_TOKEN }}charmcli{{ else }}{{ end }}"
171 secret_name: FURY_TOKEN
172
173brews:
174 - repository:
175 owner: charmbracelet
176 name: homebrew-tap
177 token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
178 commit_author:
179 name: "Charm"
180 email: "charmcli@users.noreply.github.com"
181 goarm: 7
182 extra_install: |-
183 bash_completion.install "completions/{{ .ProjectName }}.bash" => "{{ .ProjectName }}"
184 zsh_completion.install "completions/{{ .ProjectName }}.zsh" => "_{{ .ProjectName }}"
185 fish_completion.install "completions/{{ .ProjectName }}.fish"
186 man1.install "manpages/{{ .ProjectName }}.1.gz"
187
188scoops:
189 - repository:
190 owner: charmbracelet
191 name: scoop-bucket
192 token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
193 commit_author:
194 name: "Charm"
195 email: "charmcli@users.noreply.github.com"
196
197npms:
198 - name: "@charmland/crush"
199 repository: "git+https://github.com/charmbracelet/crush.git"
200 bugs: https://github.com/charmbracelet/crush/issues
201 access: public
202
203nfpms:
204 - formats:
205 - apk
206 - deb
207 - rpm
208 - archlinux
209 - termux.deb
210 file_name_template: "{{ .ConventionalFileName }}"
211 contents:
212 - src: ./completions/crush.bash
213 dst: /etc/bash_completion.d/crush
214 - src: ./completions/crush.fish
215 dst: /usr/share/fish/vendor_completions.d/crush.fish
216 - src: ./completions/crush.zsh
217 dst: /usr/share/zsh/site-functions/_crush
218 - src: ./manpages/crush.1.gz
219 dst: /usr/share/man/man1/crush.1.gz
220 rpm:
221 signature:
222 key_file: '{{ if ne (index .Env "GPG_KEY_PATH") "" }}{{ .Env.GPG_KEY_PATH }}{{ else }}{{ end }}'
223 deb:
224 signature:
225 key_file: '{{ if ne (index .Env "GPG_KEY_PATH") "" }}{{ .Env.GPG_KEY_PATH }}{{ else }}{{ end }}'
226
227signs:
228 - cmd: cosign
229 certificate: "${artifact}.pem"
230 args:
231 - sign-blob
232 - "--output-certificate=${certificate}"
233 - "--output-signature=${signature}"
234 - "${artifact}"
235 - "--yes"
236 artifacts: checksum
237 output: true
238
239source:
240 enabled: true
241
242sboms:
243 - artifacts: archive
244 - id: source
245 artifacts: source
246
247nix:
248 - repository:
249 owner: "charmbracelet"
250 name: nur
251 token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
252 commit_author:
253 name: "Charm"
254 email: "charmcli@users.noreply.github.com"
255 license: fsl11Mit
256 extra_install: |-
257 installManPage ./manpages/crush.1.gz
258 installShellCompletion ./completions/*
259
260winget:
261 - publisher: charmbracelet
262 copyright: Charmbracelet, Inc
263 publisher_url: https://charm.land
264 release_notes_url: "https://github.com/charmbracelet/crush/releases/tag/{{.Tag}}"
265 license_url: https://github.com/charmbracelet/crush/blob/main/LICENSE.md
266 commit_author:
267 name: "Charm"
268 email: "charmcli@users.noreply.github.com"
269 repository:
270 owner: "charmbracelet"
271 name: winget-pkgs
272 token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
273 branch: "crush-{{.Version}}"
274 pull_request:
275 enabled: true
276 draft: false
277 check_boxes: true
278 base:
279 owner: microsoft
280 name: winget-pkgs
281 branch: master
282
283changelog:
284 sort: asc
285 disable: "{{ .IsNightly }}"
286 use: github
287 filters:
288 exclude:
289 - "^(build|ci): "
290 - "^chore: auto-update generated files$"
291 - "^chore: docs$"
292 - "^chore: schema update$"
293 - "^chore: schema$"
294 - "^chore: typo$"
295 - "^chore: update schema$"
296 - "^chore: update$"
297 - "^chore\\(legal\\): "
298 - "^chore\\(deps\\): "
299 - "^docs: update$"
300 - "^test:"
301 - "^test\\("
302 - "merge conflict"
303 - "merge conflict"
304 - Merge branch
305 - Merge pull request
306 - Merge remote-tracking branch
307 - go mod tidy
308 - "^wip "
309 - "^wip:"
310 groups:
311 - title: "New Features"
312 regexp: '^.*?feat(\(.+\))??!?:.+$'
313 order: 100
314 - title: "Security updates"
315 regexp: '^.*?sec(\(.+\))??!?:.+$'
316 order: 150
317 - title: "Bug fixes and improvements"
318 regexp: '^.*?(fix|refactor)(\(.+\))??!?:.+$'
319 order: 200
320 - title: "Documentation updates"
321 regexp: ^.*?docs?(\(.+\))??!?:.+$
322 order: 400
323 - title: Other work
324 order: 9999
325
326release:
327 prerelease: auto
328 footer:
329 from_url:
330 url: https://raw.githubusercontent.com/charmbracelet/meta/main/footer.md