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 - goos: windows
71 goarch: arm
72 ldflags:
73 - -s -w -X github.com/charmbracelet/crush/internal/version.Version={{.Version}} -X github.com/charmbracelet/crush/internal/version.Commit={{.Commit}}
74 flags:
75 - -trimpath
76
77archives:
78 - name_template: >-
79 crush_
80 {{- .Version }}_
81 {{- title .Os }}_
82 {{- if eq .Arch "amd64" }}x86_64
83 {{- else if eq .Arch "386" }}i386
84 {{- else }}{{ .Arch }}{{ end }}
85 {{- with .Arm}}v{{ . }}{{ end }}
86 wrap_in_directory: true
87 files:
88 - README*
89 - LICENSE*
90 - manpages/*
91 - completions/*
92 format_overrides:
93 - goos: windows
94 formats: [zip]
95
96checksum:
97 name_template: "checksums.txt"
98
99aur_sources:
100 - private_key: "{{ .Env.AUR_KEY }}"
101 git_url: "ssh://aur@aur.archlinux.org/crush.git"
102 commit_author:
103 name: "Charm"
104 email: "charmcli@users.noreply.github.com"
105 makedepends:
106 - go
107 - git
108 prepare: |-
109 go mod download
110 build: |-
111 mkdir completions
112 mkdir manpages
113 export CGO_CPPFLAGS="${CPPFLAGS}"
114 export CGO_CFLAGS="${CFLAGS}"
115 export CGO_CXXFLAGS="${CXXFLAGS}"
116 export CGO_LDFLAGS="${LDFLAGS}"
117 export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
118 go build -ldflags="-w -s -buildid='' -linkmode=external -X main.version=v${pkgver}" .
119 ./crush completion bash >./completions/crush.bash
120 ./crush completion zsh >./completions/crush.zsh
121 ./crush completion fish >./completions/crush.fish
122 ./crush man | gzip -c >./manpages/crush.1.gz
123 package: |-
124 # bin
125 install -Dm755 "./crush" "${pkgdir}/usr/bin/crush"
126 # license
127 mkdir -p "${pkgdir}/usr/share/licenses/crush/"
128 install -Dm644 ./LICENSE* "${pkgdir}/usr/share/licenses/crush/"
129 # completions
130 mkdir -p "${pkgdir}/usr/share/bash-completion/completions/"
131 mkdir -p "${pkgdir}/usr/share/zsh/site-functions/"
132 mkdir -p "${pkgdir}/usr/share/fish/vendor_completions.d/"
133 install -Dm644 "./completions/crush.bash" "${pkgdir}/usr/share/bash-completion/completions/crush"
134 install -Dm644 "./completions/crush.zsh" "${pkgdir}/usr/share/zsh/site-functions/_crush"
135 install -Dm644 "./completions/crush.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/crush.fish"
136 # man pages
137 install -Dm644 "./manpages/crush.1.gz" "${pkgdir}/usr/share/man/man1/crush.1.gz"
138 # readme
139 mkdir -pv "${pkgdir}/usr/share/doc/crush/"
140 install -Dm644 README* "${pkgdir}/usr/share/doc/crush/"
141
142aurs:
143 - private_key: "{{ .Env.AUR_KEY }}"
144 git_url: "ssh://aur@aur.archlinux.org/crush-bin.git"
145 commit_author:
146 name: "Charm"
147 email: "charmcli@users.noreply.github.com"
148 provides:
149 - crush
150 conflicts:
151 - crush
152 package: |-
153 cd "${srcdir}/crush_${pkgver}_Linux_${CARCH}"
154 # bin
155 install -Dm755 "./crush" "${pkgdir}/usr/bin/crush"
156 # license
157 mkdir -p "${pkgdir}/usr/share/licenses/crush/"
158 install -Dm644 ./LICENSE* "${pkgdir}/usr/share/licenses/crush/"
159 # completions
160 mkdir -p "${pkgdir}/usr/share/bash-completion/completions/"
161 mkdir -p "${pkgdir}/usr/share/zsh/site-functions/"
162 mkdir -p "${pkgdir}/usr/share/fish/vendor_completions.d/"
163 install -Dm644 "./completions/crush.bash" "${pkgdir}/usr/share/bash-completion/completions/crush"
164 install -Dm644 "./completions/crush.zsh" "${pkgdir}/usr/share/zsh/site-functions/_crush"
165 install -Dm644 "./completions/crush.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/crush.fish"
166 # man pages
167 install -Dm644 "./manpages/crush.1.gz" "${pkgdir}/usr/share/man/man1/crush.1.gz"
168 # readme
169 mkdir -pv "${pkgdir}/usr/share/doc/crush/"
170 install -Dm644 README* "${pkgdir}/usr/share/doc/crush/"
171
172furies:
173 - disable: "{{ .IsNightly }}"
174 account: "{{ with .Env.FURY_TOKEN }}charmcli{{ else }}{{ end }}"
175 secret_name: FURY_TOKEN
176
177brews:
178 - repository:
179 owner: charmbracelet
180 name: homebrew-tap
181 token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
182 commit_author:
183 name: "Charm"
184 email: "charmcli@users.noreply.github.com"
185 goarm: 7
186 extra_install: |-
187 bash_completion.install "completions/{{ .ProjectName }}.bash" => "{{ .ProjectName }}"
188 zsh_completion.install "completions/{{ .ProjectName }}.zsh" => "_{{ .ProjectName }}"
189 fish_completion.install "completions/{{ .ProjectName }}.fish"
190 man1.install "manpages/{{ .ProjectName }}.1.gz"
191
192scoops:
193 - repository:
194 owner: charmbracelet
195 name: scoop-bucket
196 token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
197 commit_author:
198 name: "Charm"
199 email: "charmcli@users.noreply.github.com"
200
201npms:
202 - name: "@charmland/crush"
203 repository: "git+https://github.com/charmbracelet/crush.git"
204 bugs: https://github.com/charmbracelet/crush/issues
205 access: public
206
207nfpms:
208 - formats:
209 - apk
210 - deb
211 - rpm
212 - archlinux
213 - termux.deb
214 file_name_template: "{{ .ConventionalFileName }}"
215 contents:
216 - src: ./completions/crush.bash
217 dst: '{{ if eq .Format "termux.deb" }}/data/data/com.termux/files/usr{{ end }}/etc/bash_completion.d/crush'
218 - src: ./completions/crush.fish
219 dst: '{{ if eq .Format "termux.deb" }}/data/data/com.termux/files{{ end }}/usr/share/fish/vendor_completions.d/crush.fish'
220 - src: ./completions/crush.zsh
221 dst: '{{ if eq .Format "termux.deb" }}/data/data/com.termux/files{{ end }}/usr/share/zsh/site-functions/_crush'
222 - src: ./manpages/crush.1.gz
223 dst: '{{ if eq .Format "termux.deb" }}/data/data/com.termux/files{{ end }}/usr/share/man/man1/crush.1.gz'
224 rpm:
225 signature:
226 key_file: '{{ if ne (index .Env "GPG_KEY_PATH") "" }}{{ .Env.GPG_KEY_PATH }}{{ else }}{{ end }}'
227 deb:
228 signature:
229 key_file: '{{ if ne (index .Env "GPG_KEY_PATH") "" }}{{ .Env.GPG_KEY_PATH }}{{ else }}{{ end }}'
230
231signs:
232 - cmd: cosign
233 certificate: "${artifact}.pem"
234 args:
235 - sign-blob
236 - "--output-certificate=${certificate}"
237 - "--output-signature=${signature}"
238 - "${artifact}"
239 - "--yes"
240 artifacts: checksum
241 output: true
242
243source:
244 enabled: true
245
246sboms:
247 - artifacts: archive
248 - id: source
249 artifacts: source
250
251nix:
252 - repository:
253 owner: "charmbracelet"
254 name: nur
255 token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
256 commit_author:
257 name: "Charm"
258 email: "charmcli@users.noreply.github.com"
259 license: fsl11Mit
260 extra_install: |-
261 installManPage ./manpages/crush.1.gz
262 installShellCompletion ./completions/*
263
264winget:
265 - publisher: charmbracelet
266 copyright: Charmbracelet, Inc
267 publisher_url: https://charm.land
268 release_notes_url: "https://github.com/charmbracelet/crush/releases/tag/{{.Tag}}"
269 license_url: https://github.com/charmbracelet/crush/blob/main/LICENSE.md
270 commit_author:
271 name: "Charm"
272 email: "charmcli@users.noreply.github.com"
273 repository:
274 owner: "charmbracelet"
275 name: winget-pkgs
276 token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
277 branch: "crush-{{.Version}}"
278 pull_request:
279 enabled: true
280 draft: false
281 check_boxes: true
282 base:
283 owner: microsoft
284 name: winget-pkgs
285 branch: master
286
287changelog:
288 sort: asc
289 disable: "{{ .IsNightly }}"
290 use: github
291 filters:
292 exclude:
293 - "^(build|ci): "
294 - "^chore: auto-update generated files$"
295 - "^chore: docs$"
296 - "^chore: schema update$"
297 - "^chore: schema$"
298 - "^chore: typo$"
299 - "^chore: update schema$"
300 - "^chore: update$"
301 - "^chore\\(legal\\): "
302 - "^chore\\(deps\\): "
303 - "^docs: update$"
304 - "^test:"
305 - "^test\\("
306 - "merge conflict"
307 - "merge conflict"
308 - Merge branch
309 - Merge pull request
310 - Merge remote-tracking branch
311 - go mod tidy
312 - "^wip "
313 - "^wip:"
314 groups:
315 - title: "New Features"
316 regexp: '^.*?feat(\(.+\))??!?:.+$'
317 order: 100
318 - title: "Security updates"
319 regexp: '^.*?sec(\(.+\))??!?:.+$'
320 order: 150
321 - title: "Bug fixes and improvements"
322 regexp: '^.*?(fix|refactor)(\(.+\))??!?:.+$'
323 order: 200
324 - title: "Documentation updates"
325 regexp: ^.*?docs?(\(.+\))??!?:.+$
326 order: 400
327 - title: Other work
328 order: 9999
329
330release:
331 prerelease: auto
332 footer:
333 from_url:
334 url: https://raw.githubusercontent.com/charmbracelet/meta/main/footer.md