.goreleaser.yml

  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    goarch:
 50      - amd64
 51      - arm64
 52    ldflags:
 53      - -s -w -X github.com/charmbracelet/crush/internal/version.Version={{.Version}}
 54
 55archives:
 56  - name_template: >-
 57      crush_
 58      {{- .Version }}_
 59      {{- title .Os }}_
 60      {{- if eq .Arch "amd64" }}x86_64
 61      {{- else if eq .Arch "386" }}i386
 62      {{- else }}{{ .Arch }}{{ end }}
 63      {{- with .Arm}}v{{ . }}{{ end }}
 64    wrap_in_directory: true
 65    files:
 66      - README*
 67      - LICENSE*
 68      - manpages/*
 69      - completions/*
 70    format_overrides:
 71      - goos: windows
 72        formats: [zip]
 73
 74checksum:
 75  name_template: "checksums.txt"
 76
 77aurs:
 78  - private_key: "{{ .Env.AUR_KEY }}"
 79    git_url: "ssh://aur@aur.archlinux.org/crush-bin.git"
 80    provides:
 81      - crush
 82    conflicts:
 83      - crush
 84    package: |-
 85      cd "${srcdir}/crush_${pkgver}_Linux_${CARCH}"
 86      # bin
 87      install -Dm755 "./crush" "${pkgdir}/usr/bin/crush"
 88      # license
 89      mkdir -p "${pkgdir}/usr/share/licenses/crush/"
 90      install -Dm644 ./LICENSE* "${pkgdir}/usr/share/licenses/crush/"
 91      # completions
 92      mkdir -p "${pkgdir}/usr/share/bash-completion/completions/"
 93      mkdir -p "${pkgdir}/usr/share/zsh/site-functions/"
 94      mkdir -p "${pkgdir}/usr/share/fish/vendor_completions.d/"
 95      install -Dm644 "./completions/crush.bash" "${pkgdir}/usr/share/bash-completion/completions/crush"
 96      install -Dm644 "./completions/crush.zsh" "${pkgdir}/usr/share/zsh/site-functions/_crush"
 97      install -Dm644 "./completions/crush.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/crush.fish"
 98      # man pages
 99      install -Dm644 "./manpages/crush.1.gz" "${pkgdir}/usr/share/man/man1/crush.1.gz"
100      # readme
101      mkdir -pv "${pkgdir}/usr/share/doc/crush/"
102      install -Dm644 README* "${pkgdir}/usr/share/doc/crush/"
103
104furies:
105  - disable: "{{ .IsNightly }}"
106    account: "{{ with .Env.FURY_TOKEN }}charmcli{{ else }}{{ end }}"
107    secret_name: FURY_TOKEN
108
109homebrew_casks:
110  - repository:
111      owner: charmbracelet
112      name: homebrew-tap
113      token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
114
115npms:
116  - name: "@charmland/crush"
117    repository: "git+https://github.com/charmbracelet/crush.git"
118    bugs: https://github.com/charmbracelet/crush/issues
119    access: public
120
121nfpms:
122  - formats:
123      - apk
124      - deb
125      - rpm
126      - archlinux
127    file_name_template: "{{ .ConventionalFileName }}"
128    contents:
129      - src: ./completions/crush.bash
130        dst: /etc/bash_completion.d/crush
131      - src: ./completions/crush.fish
132        dst: /usr/share/fish/vendor_completions.d/crush.fish
133      - src: ./completions/crush.zsh
134        dst: /usr/share/zsh/site-functions/_crush
135      - src: ./manpages/crush.1.gz
136        dst: /usr/share/man/man1/crush.1.gz
137
138nix:
139  - repository:
140      owner: "charmbracelet"
141      name: nur
142      token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
143    extra_install: |-
144      installManPage ./manpages/crush.1.gz.
145      installShellCompletion ./completions/*
146
147winget:
148  - publisher: charmbracelet
149    copyright: Charmbracelet, Inc
150    repository:
151      owner: "charmbracelet"
152      name: winget-pkgs
153      token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
154      branch: "crush-{{.Version}}"
155      pull_request:
156        enabled: true
157        draft: false
158        check_boxes: true
159        base:
160          owner: microsoft
161          name: winget-pkgs
162          branch: master
163
164changelog:
165  sort: asc
166  disable: "{{ .IsNightly }}"
167  filters:
168    exclude:
169      - "^(build|ci): "
170      - "^chore: auto-update generated files$"
171      - "^chore: docs$"
172      - "^chore: schema update$"
173      - "^chore: schema$"
174      - "^chore: typo$"
175      - "^chore: update schema$"
176      - "^chore: update$"
177      - "^chore\\(deps\\): "
178      - "^docs: update$"
179      - "^test:"
180      - "^test\\("
181      - "merge conflict"
182      - "merge conflict"
183      - Merge branch
184      - Merge pull request
185      - Merge remote-tracking branch
186      - go mod tidy
187      - "^wip "
188      - "^wip:"
189  groups:
190    - title: "New Features"
191      regexp: '^.*?feat(\(.+\))??!?:.+$'
192      order: 100
193    - title: "Security updates"
194      regexp: '^.*?sec(\(.+\))??!?:.+$'
195      order: 150
196    - title: "Bug fixes and improvements"
197      regexp: '^.*?(fix|refactor)(\(.+\))??!?:.+$'
198      order: 200
199    - title: "Documentation updates"
200      regexp: ^.*?docs?(\(.+\))??!?:.+$
201      order: 400
202    - title: Other work
203      order: 9999