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: "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
118homebrew_casks:
119  - repository:
120      owner: charmbracelet
121      name: homebrew-tap
122      token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
123
124npms:
125  - name: "@charmland/crush"
126    repository: "git+https://github.com/charmbracelet/crush.git"
127    bugs: https://github.com/charmbracelet/crush/issues
128    access: public
129
130nfpms:
131  - formats:
132      - apk
133      - deb
134      - rpm
135      - archlinux
136    file_name_template: "{{ .ConventionalFileName }}"
137    contents:
138      - src: ./completions/crush.bash
139        dst: /etc/bash_completion.d/crush
140      - src: ./completions/crush.fish
141        dst: /usr/share/fish/vendor_completions.d/crush.fish
142      - src: ./completions/crush.zsh
143        dst: /usr/share/zsh/site-functions/_crush
144      - src: ./manpages/crush.1.gz
145        dst: /usr/share/man/man1/crush.1.gz
146
147signs:
148  - cmd: cosign
149    certificate: "${artifact}.pem"
150    args:
151      - sign-blob
152      - "--output-certificate=${certificate}"
153      - "--output-signature=${signature}"
154      - "${artifact}"
155      - "--yes"
156    artifacts: checksum
157    output: true
158
159source:
160  enabled: true
161
162sboms:
163  - artifacts: archive
164  - id: source
165    artifacts: source
166
167nix:
168  - repository:
169      owner: "charmbracelet"
170      name: nur
171      token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
172    extra_install: |-
173      installManPage ./manpages/crush.1.gz.
174      installShellCompletion ./completions/*
175
176winget:
177  - publisher: charmbracelet
178    copyright: Charmbracelet, Inc
179    repository:
180      owner: "charmbracelet"
181      name: winget-pkgs
182      token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
183      branch: "crush-{{.Version}}"
184      pull_request:
185        enabled: true
186        draft: false
187        check_boxes: true
188        base:
189          owner: microsoft
190          name: winget-pkgs
191          branch: master
192
193changelog:
194  sort: asc
195  disable: "{{ .IsNightly }}"
196  filters:
197    exclude:
198      - "^(build|ci): "
199      - "^chore: auto-update generated files$"
200      - "^chore: docs$"
201      - "^chore: schema update$"
202      - "^chore: schema$"
203      - "^chore: typo$"
204      - "^chore: update schema$"
205      - "^chore: update$"
206      - "^chore\\(deps\\): "
207      - "^docs: update$"
208      - "^test:"
209      - "^test\\("
210      - "merge conflict"
211      - "merge conflict"
212      - Merge branch
213      - Merge pull request
214      - Merge remote-tracking branch
215      - go mod tidy
216      - "^wip "
217      - "^wip:"
218  groups:
219    - title: "New Features"
220      regexp: '^.*?feat(\(.+\))??!?:.+$'
221      order: 100
222    - title: "Security updates"
223      regexp: '^.*?sec(\(.+\))??!?:.+$'
224      order: 150
225    - title: "Bug fixes and improvements"
226      regexp: '^.*?(fix|refactor)(\(.+\))??!?:.+$'
227      order: 200
228    - title: "Documentation updates"
229      regexp: ^.*?docs?(\(.+\))??!?:.+$
230      order: 400
231    - title: Other work
232      order: 9999
233
234release:
235  prerelease: auto
236  footer:
237    from_url:
238      url: https://raw.githubusercontent.com/charmbracelet/meta/main/footer.md