-
Notifications
You must be signed in to change notification settings - Fork 4
/
.goreleaser.yaml
218 lines (196 loc) · 7.08 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
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com
#before:
# hooks:
# # You may remove this if you don't use go modules.
# - go mod tidy
# # you may remove this if you don't need go generate
# - go generate ./...
builds:
- env:
- CGO_ENABLED=0
main: ./cmd/bc-cli/
ldflags:
- -s -w -X k8s.io/component-base/version.gitVersion={{.Version}} -X k8s.io/component-base/version.gitCommit={{.Commit}} -X k8s.io/component-base/version.buildDate={{.Date}}
goos:
- linux
- windows
- darwin
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 }}
# use zip for windows archives
format_overrides:
- goos: windows
format: zip
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
# Sorts the changelog by the commit's messages.
# Could either be asc, desc or empty
sort: asc
# Changelog generation implementation to use.
#
# Valid options are:
# - `git`: uses `git log`;
# - `github`: uses the compare GitHub API, appending the author login to the changelog.
# - `gitlab`: uses the compare GitLab API, appending the author name and email to the changelog.
# - `github-native`: uses the GitHub release notes generation API, disables the groups feature.
#
# Default: 'git'
use: github
# Group commits messages by given regex and title.
# Order value defines the order of the groups.
# Providing no regex means all commits will be grouped under the default group.
# Groups are disabled when using github-native, as it already groups things by itself.
# Matches are performed against strings of the form: "<abbrev-commit>[:] <title-commit>".
# Regex use RE2 syntax as defined here: https://github.com/google/re2/wiki/Syntax.
groups:
- title: New Features
regexp: "^.*feat[(\\w)]*:+.*$"
order: 0
- title: 'Bug Fixes'
regexp: "^.*fix[(\\w)]*:+.*$"
order: 1
- title: Others
order: 999
filters:
# Commit messages matching the regexp listed here will be removed from
# the changelog
exclude:
- '^Merge pull request'
release:
# Repo in which the release will be created.
# Default is extracted from the origin remote URL or empty if its private hosted.
# github:
# owner: user
# name: repo
# IDs of the archives to use.
# Empty means all IDs.
#
# Default: []
# ids:
# - foo
# - bar
# If set to true, will not auto-publish the release.
# Available only for GitHub and Gitea.
#
# Default: false
draft: true
# 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.
#
# Default: false
# Since: v1.11
replace_existing_draft: false
# 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: ''
# Since: v1.11
# Templates: allowed
# target_commitish: '{{ .Commit }}'
# This allows to change which tag GitHub will create.
# Usually you'll use this together with `target_commitish`, or if you want to
# publish a binary from a monorepo into a public repository somewhere, without
# the tag prefix.
#
# Default: '{{ .PrefixedCurrentTag }}'
# Since: v1.19 (pro)
# Templates: allowed
# tag: '{{ .CurrentTag }}'
# 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 is empty.
# 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 is false.
# prerelease: auto
# 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 is `keep-existing`.
mode: append
# Header for the release body.
#
# Templates: allowed
header: |
## {{.ProjectName}}-v{{.Version}}
Welcome to this new release!
### Breaking Changes:
None
### Feature summary 🚀 🚀 🚀
# Footer for the release body.
#
# Templates: allowed
footer: |
## Thanks to our Contributors!
Thank you to everyone who contributed to {{.Tag}}! ❤️
And thank you very much to everyone else not listed here who contributed in other ways like filing issues, giving feedback, testing fixes, helping users in slack, etc. 🙏
# 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 (since v1.15)
# disable: true
# 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.
#
# Since: v1.11
# Templates: allowed (since v1.15)
# skip_upload: true
# 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:
# - glob: ./path/to/file.txt
# - glob: ./glob/**/to/**/file/**/*
# - glob: ./glob/foo/to/bar/file/foobar/override_from_previous
# - glob: ./single_file.txt
# name_template: file.txt # note that this only works if glob matches 1 file only
# Additional templated extra files to add to the release.
# Those files will have their contents pass through the template engine,
# and its results will be added to the release.
#
# Since: v1.17 (pro)
# This feature is only available in GoReleaser Pro.
# Templates: allowed
# templated_extra_files:
# - src: LICENSE.tpl
# dst: LICENSE.txt
# The lines beneath this are called `modelines`. See `:help modeline`
# Feel free to remove those if you don't want/use them.
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj