-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.goreleaser.yaml
248 lines (218 loc) · 7.85 KB
/
.goreleaser.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com
# The lines below are called `modelines`. See `:help modeline`
# Feel free to remove those if you don't want/need to use them.
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
version: 2
before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
- rm -rf completions
- mkdir completions
- rm -rf manpages
- mkdir manpages
- sh -c 'go run cmd/cli/main.go completion "bash" >./completions/{{ .ProjectName }}.bash'
- sh -c 'go run cmd/cli/main.go completion "zsh" >./completions/{{ .ProjectName }}.zsh'
- sh -c 'go run cmd/cli/main.go completion "fish" >./completions/{{ .ProjectName }}.fish'
- sh -c 'go run cmd/cli/main.go manpage | gzip -c >./manpages/{{ .ProjectName }}.1.gz'
builds:
- id: ai-cli
main: ./cmd/cli
env:
- CGO_ENABLED=0
- VERSION_PACKAGE=github.com/coding-hui/common/version
binary: ai
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
# List of combinations of GOOS + GOARCH + GOARM to ignore.
ignore:
- goos: windows
goarch: i386
- goos: darwin
goarch: 386
- goos: linux
goarch: arm
goarm: 7
- goarm: mips64
- gomips: hardfloat
- goamd64: v4
ldflags:
- -s -w -X {{ .Env.VERSION_PACKAGE }}.GitVersion={{ .Version }} -X {{ .Env.VERSION_PACKAGE }}.GitCommit={{ .Commit }} -X {{ .Env.VERSION_PACKAGE }}.GitTreeState={{ .IsGitDirty }} -X {{ .Env.VERSION_PACKAGE }}.BuildDate={{ .CommitDate }}
archives:
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of `uname`.
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
wrap_in_directory: true
# use zip for windows archives
files:
- README*
- LICENSE*
- manpages/*
- completions/*
format_overrides:
- goos: windows
format: zip
changelog:
sort: asc
filters:
include:
- "^feat:"
- "^fix:"
- "^perf:"
- "^refactor:"
exclude:
- "^docs:"
- "^test:"
- "^chore:"
groups:
- title: Features
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
order: 0
- title: "Bug Fixes"
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
order: 1
- title: "Performance Improvements"
regexp: '^.*?perf(\([[:word:]]+\))??!?:.+$'
order: 2
- title: "Code Refactoring"
regexp: '^.*?refactor(\([[:word:]]+\))??!?:.+$'
order: 3
- title: "Auto Coder Generated Code"
regexp: '^.*?auto-coder(\([[:word:]]+\))??!?:.+$'
order: 4
- title: Others
order: 999
report_sizes: true
brews:
- repository:
owner: coding-hui
name: homebrew-tap
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
commit_author:
name: "Coding Hui"
email: wecoding@yeah.net
homepage: https://github.com/coding-hui/ai-terminal
description: "AI driven development in your terminal"
extra_install: |-
bash_completion.install "completions/{{ .ProjectName }}.bash" => "{{ .ProjectName }}"
zsh_completion.install "completions/{{ .ProjectName }}.zsh" => "_{{ .ProjectName }}"
fish_completion.install "completions/{{ .ProjectName }}.fish"
man1.install "manpages/{{ .ProjectName }}.1.gz"
release:
# Repo in which the release will be created.
# Default: extracted from the origin remote URL or empty if its private hosted.
# github:
# owner: coding-hui
# name: ai-terminal
# IDs of the archives to use.
# Empty means all IDs.
#
# Default: [].
# ids: []
# If set to true, will not auto-publish the release.
# Note: all GitHub releases start as drafts while artifacts are uploaded.
# Available only for GitHub and Gitea.
draft: false
# Whether to remove existing draft releases with the same name before creating
# a new one.
#
# Only effective if `draft` is set to true.
# Available only for GitHub.
replace_existing_draft: true
# Whether to remove an artifact that already exists.
#
# Available only for GitHub.
# This might be a bit expensive (rate-limiting speaking), so it is only done
# when the upload of an artifact fails with a 422 (which means it already
# exists in the release).
# We then grab the list of artifacts from the release, and delete the file
# that matches the one we're trying to upload.
# GoReleaser will then retry its upload.
replace_existing_artifacts: true
# Useful if you want to delay the creation of the tag in the remote.
# You can create the tag locally, but not push it, and run GoReleaser.
# It'll then set the `target_commitish` portion of the GitHub release to the
# value of this field.
# Only works on GitHub.
#
# Default: ''.
# Templates: allowed.
target_commitish: "{{ .Commit }}"
# If set, will create a release discussion in the category specified.
#
# Warning: do not use categories in the 'Announcement' format.
# Check https://github.com/goreleaser/goreleaser/issues/2304 for more info.
#
# Default: ''.
discussion_category_name: General
# If set to auto, will mark the release as not ready for production
# in case there is an indicator for this in the tag e.g. v1.0.0-rc1
# If set to true, will mark the release as not ready for production.
# Default: false.
prerelease: auto
# If set to false, will NOT mark the release as "latest".
# This prevents it from being shown at the top of the release list,
# and from being returned when calling https://api.github.com/repos/OWNER/REPO/releases/latest.
#
# Available only for GitHub.
#
# Default: true.
make_latest: true
# What to do with the release notes in case there the release already exists.
#
# Valid options are:
# - `keep-existing`: keep the existing notes
# - `append`: append the current release notes to the existing notes
# - `prepend`: prepend the current release notes to the existing notes
# - `replace`: replace existing notes
#
# Default: `keep-existing`.
mode: append
# You can change the name of the release.
#
# Default: '{{.Tag}}' ('{{.PrefixedTag}}' on Pro).
# Templates: allowed.
name_template: "v{{ .Version }}"
# You can disable this pipe in order to not create the release on any SCM.
# Keep in mind that this might also break things that depend on the release
# URL, for instance, homebrew taps.
#
# Templates: allowed.
disable: false
# Set this to true if you want to disable just the artifact upload to the SCM.
# If this is true, GoReleaser will still create the release with the
# changelog, but won't upload anything to it.
#
# Templates: allowed.
skip_upload: false
# You can add extra pre-existing files to the release.
# The filename on the release will be the last part of the path (base).
# If another file with the same name exists, the last one found will be used.
#
# Templates: allowed.
# extra_files: []
# Upload metadata.json and artifacts.json to the release as well.
include_meta: true
footer: |
**Full Changelog**: https://github.com/coding-hui/ai-terminal/compare/{{ .PreviousTag }}...{{ if .IsNightly }}nightly{{ else }}{{ .Tag }}{{ end }}
{{ if not .IsNightly }}
## Helping out
This release is only possible thanks to **all** the support of some **awesome people**!
Want to be one of them?
You can [contribute with code](https://github.com/coding-hui/ai-terminal?tab=readme-ov-file#contributing).
## Where to go next?
* Find examples and commented usage of all options in our [website](https://github.com/coding-hui/ai-terminal?tab=readme-ov-file#usage).
{{ end }}