.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
114npms:
115  - name: "@charmland/crush"
116    repository: "git+https://github.com/charmbracelet/crush.git"
117    bugs: https://github.com/charmbracelet/crush/issues
118    access: public
119
120nfpms:
121  - formats:
122      - apk
123      - deb
124      - rpm
125      - archlinux
126    file_name_template: "{{ .ConventionalFileName }}"
127    contents:
128      - src: ./completions/crush.bash
129        dst: /etc/bash_completion.d/crush
130      - src: ./completions/crush.fish
131        dst: /usr/share/fish/vendor_completions.d/crush.fish
132      - src: ./completions/crush.zsh
133        dst: /usr/share/zsh/site-functions/_crush
134      - src: ./manpages/crush.1.gz
135        dst: /usr/share/man/man1/crush.1.gz
136
137changelog:
138  sort: asc
139  disable: "{{ .IsNightly }}"
140  filters:
141    exclude:
142      - "^(build|ci): "
143      - "^chore: auto-update generated files$"
144      - "^chore: docs$"
145      - "^chore: schema update$"
146      - "^chore: schema$"
147      - "^chore: typo$"
148      - "^chore: update schema$"
149      - "^chore: update$"
150      - "^chore\\(deps\\): "
151      - "^docs: update$"
152      - "^test:"
153      - "^test\\("
154      - "merge conflict"
155      - "merge conflict"
156      - Merge branch
157      - Merge pull request
158      - Merge remote-tracking branch
159      - go mod tidy
160      - "^wip "
161      - "^wip:"
162  groups:
163    - title: "New Features"
164      regexp: '^.*?feat(\(.+\))??!?:.+$'
165      order: 100
166    - title: "Security updates"
167      regexp: '^.*?sec(\(.+\))??!?:.+$'
168      order: 150
169    - title: "Bug fixes and improvements"
170      regexp: '^.*?(fix|refactor)(\(.+\))??!?:.+$'
171      order: 200
172    - title: "Documentation updates"
173      regexp: ^.*?docs?(\(.+\))??!?:.+$
174      order: 400
175    - title: Other work
176      order: 9999