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