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 maintainers:
17 - "kujtimiihoxha <kujtim@charm.sh>"
18
19nightly:
20 publish_release: true
21 keep_single_release: true
22 version_template: "{{ incminor .Version }}-nightly"
23
24snapshot:
25 version_template: "0.0.0-{{ .Timestamp }}"
26
27before:
28 hooks:
29 - go mod tidy
30 - rm -rf completions
31 - mkdir completions
32 - rm -rf manpages
33 - mkdir manpages
34 - sh -c 'go run . completion bash >./completions/crush.bash'
35 - sh -c 'go run . completion zsh >./completions/crush.zsh'
36 - sh -c 'go run . completion fish >./completions/crush.fish'
37 - sh -c 'go run . man | gzip -c >./manpages/crush.1.gz'
38
39# gomod:
40# proxy: true
41
42builds:
43 - env:
44 - CGO_ENABLED=0
45 goos:
46 - linux
47 - darwin
48 - windows
49 - freebsd
50 # TODO: those fail to build
51 # - openbsd
52 # - netbsd
53 goarch:
54 - amd64
55 - arm64
56 - "386"
57 - arm
58 goarm:
59 - "7"
60
61 ldflags:
62 - -s -w -X github.com/charmbracelet/crush/internal/version.Version={{.Version}}
63
64archives:
65 - name_template: >-
66 crush_
67 {{- .Version }}_
68 {{- title .Os }}_
69 {{- if eq .Arch "amd64" }}x86_64
70 {{- else if eq .Arch "386" }}i386
71 {{- else }}{{ .Arch }}{{ end }}
72 {{- with .Arm}}v{{ . }}{{ end }}
73 wrap_in_directory: true
74 files:
75 - README*
76 - LICENSE*
77 - manpages/*
78 - completions/*
79 format_overrides:
80 - goos: windows
81 formats: [zip]
82
83checksum:
84 name_template: "checksums.txt"
85
86aurs:
87 - private_key: "{{ .Env.AUR_KEY }}"
88 git_url: "ssh://aur@aur.archlinux.org/crush-bin.git"
89 provides:
90 - crush
91 conflicts:
92 - crush
93 package: |-
94 cd "${srcdir}/crush_${pkgver}_Linux_${CARCH}"
95 # bin
96 install -Dm755 "./crush" "${pkgdir}/usr/bin/crush"
97 # license
98 mkdir -p "${pkgdir}/usr/share/licenses/crush/"
99 install -Dm644 ./LICENSE* "${pkgdir}/usr/share/licenses/crush/"
100 # completions
101 mkdir -p "${pkgdir}/usr/share/bash-completion/completions/"
102 mkdir -p "${pkgdir}/usr/share/zsh/site-functions/"
103 mkdir -p "${pkgdir}/usr/share/fish/vendor_completions.d/"
104 install -Dm644 "./completions/crush.bash" "${pkgdir}/usr/share/bash-completion/completions/crush"
105 install -Dm644 "./completions/crush.zsh" "${pkgdir}/usr/share/zsh/site-functions/_crush"
106 install -Dm644 "./completions/crush.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/crush.fish"
107 # man pages
108 install -Dm644 "./manpages/crush.1.gz" "${pkgdir}/usr/share/man/man1/crush.1.gz"
109 # readme
110 mkdir -pv "${pkgdir}/usr/share/doc/crush/"
111 install -Dm644 README* "${pkgdir}/usr/share/doc/crush/"
112
113furies:
114 - disable: "{{ .IsNightly }}"
115 account: "{{ with .Env.FURY_TOKEN }}charmcli{{ else }}{{ end }}"
116 secret_name: FURY_TOKEN
117
118brews:
119 - repository:
120 owner: charmbracelet
121 name: homebrew-tap
122 token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
123 goarm: 7
124 extra_install: |-
125 bash_completion.install "completions/{{ .ProjectName }}.bash" => "{{ .ProjectName }}"
126 zsh_completion.install "completions/{{ .ProjectName }}.zsh" => "_{{ .ProjectName }}"
127 fish_completion.install "completions/{{ .ProjectName }}.fish"
128 man1.install "manpages/{{ .ProjectName }}.1.gz"
129
130npms:
131 - name: "@charmland/crush"
132 repository: "git+https://github.com/charmbracelet/crush.git"
133 bugs: https://github.com/charmbracelet/crush/issues
134 access: public
135
136nfpms:
137 - formats:
138 - apk
139 - deb
140 - rpm
141 - archlinux
142 file_name_template: "{{ .ConventionalFileName }}"
143 contents:
144 - src: ./completions/crush.bash
145 dst: /etc/bash_completion.d/crush
146 - src: ./completions/crush.fish
147 dst: /usr/share/fish/vendor_completions.d/crush.fish
148 - src: ./completions/crush.zsh
149 dst: /usr/share/zsh/site-functions/_crush
150 - src: ./manpages/crush.1.gz
151 dst: /usr/share/man/man1/crush.1.gz
152 rpm:
153 signature:
154 key_file: '{{ if ne (index .Env "GPG_KEY_PATH") "" }}{{ .Env.GPG_KEY_PATH }}{{ else }}{{ end }}'
155 deb:
156 signature:
157 key_file: '{{ if ne (index .Env "GPG_KEY_PATH") "" }}{{ .Env.GPG_KEY_PATH }}{{ else }}{{ end }}'
158
159signs:
160 - cmd: cosign
161 certificate: "${artifact}.pem"
162 args:
163 - sign-blob
164 - "--output-certificate=${certificate}"
165 - "--output-signature=${signature}"
166 - "${artifact}"
167 - "--yes"
168 artifacts: checksum
169 output: true
170
171source:
172 enabled: true
173
174sboms:
175 - artifacts: archive
176 - id: source
177 artifacts: source
178
179nix:
180 - repository:
181 owner: "charmbracelet"
182 name: nur
183 token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
184 extra_install: |-
185 installManPage ./manpages/crush.1.gz
186 installShellCompletion ./completions/*
187
188winget:
189 - publisher: charmbracelet
190 copyright: Charmbracelet, Inc
191 repository:
192 owner: "charmbracelet"
193 name: winget-pkgs
194 token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
195 branch: "crush-{{.Version}}"
196 pull_request:
197 enabled: true
198 draft: false
199 check_boxes: true
200 base:
201 owner: microsoft
202 name: winget-pkgs
203 branch: master
204
205changelog:
206 sort: asc
207 disable: "{{ .IsNightly }}"
208 filters:
209 exclude:
210 - "^(build|ci): "
211 - "^chore: auto-update generated files$"
212 - "^chore: docs$"
213 - "^chore: schema update$"
214 - "^chore: schema$"
215 - "^chore: typo$"
216 - "^chore: update schema$"
217 - "^chore: update$"
218 - "^chore\\(deps\\): "
219 - "^docs: update$"
220 - "^test:"
221 - "^test\\("
222 - "merge conflict"
223 - "merge conflict"
224 - Merge branch
225 - Merge pull request
226 - Merge remote-tracking branch
227 - go mod tidy
228 - "^wip "
229 - "^wip:"
230 groups:
231 - title: "New Features"
232 regexp: '^.*?feat(\(.+\))??!?:.+$'
233 order: 100
234 - title: "Security updates"
235 regexp: '^.*?sec(\(.+\))??!?:.+$'
236 order: 150
237 - title: "Bug fixes and improvements"
238 regexp: '^.*?(fix|refactor)(\(.+\))??!?:.+$'
239 order: 200
240 - title: "Documentation updates"
241 regexp: ^.*?docs?(\(.+\))??!?:.+$
242 order: 400
243 - title: Other work
244 order: 9999
245
246release:
247 prerelease: auto
248 footer:
249 from_url:
250 url: https://raw.githubusercontent.com/charmbracelet/meta/main/footer.md