Skip to content

Commit c18b5d7

Browse files
authored
feat(goreleaser): Update changelog section of .goreleaser.yml (#381)
* feat(goreleaser): Update `changelog` section of `.goreleaser.yml` * Unify regeps format by adding ^.*? prefix to `filters.exclude`
1 parent 9059ac6 commit c18b5d7

File tree

1 file changed

+78
-7
lines changed

1 file changed

+78
-7
lines changed

.goreleaser.yml

Lines changed: 78 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@ builds:
2424
goarch: arm64
2525
checksum:
2626
name_template: '{{ .ProjectName }}_{{.Env.RELEASE_VERSION}}_checksums.txt'
27-
changelog:
28-
sort: asc
29-
filters:
30-
exclude:
31-
- '^docs:'
32-
- '^test:'
3327

3428
archives:
3529
- id: archives
@@ -70,7 +64,7 @@ brews:
7064

7165
# Folder inside the repository to put the formula.
7266
# Default is the root folder.
73-
folder: Formula
67+
directory: Formula
7468

7569
# Caveats for the user of your binary.
7670
# Default is empty.
@@ -102,3 +96,80 @@ brews:
10296
# Default is 'bin.install "program"'.
10397
install: |
10498
bin.install "tfswitch"
99+
100+
changelog:
101+
# Set this to true if you don't want any changelog at all.
102+
# Templates: allowed
103+
disable: "{{ .Env.NO_CREATE_CHANGELOG }}"
104+
105+
# Changelog generation implementation to use.
106+
#
107+
# Valid options are:
108+
# - `git`: uses `git log`;
109+
# - `github`: uses the compare GitHub API, appending the author login to the changelog.
110+
# - `gitlab`: uses the compare GitLab API, appending the author name and email to the changelog.
111+
# - `github-native`: uses the GitHub release notes generation API, disables the groups feature.
112+
#
113+
# Default: 'git'
114+
use: github
115+
116+
# Sorts the changelog by the commit's messages.
117+
# Could either be asc, desc or empty
118+
# Empty means 'no sorting', it'll use the output of `git log` as is.
119+
sort:
120+
121+
# Max commit hash length to use in the changelog.
122+
#
123+
# 0: use whatever the changelog implementation gives you
124+
# -1: remove the commit hash from the changelog
125+
# any other number: max length.
126+
abbrev: -1
127+
128+
# Group commits messages by given regex and title.
129+
# Order value defines the order of the groups.
130+
# Providing no regex means all commits will be grouped under the default group.
131+
#
132+
# Matches are performed against the first line of the commit message only,
133+
# prefixed with the commit SHA1, usually in the form of
134+
# `<abbrev-commit>[:] <title-commit>`.
135+
# Groups are disabled when using github-native, as it already groups things by itself.
136+
# Regex use RE2 syntax as defined here: https://github.com/google/re2/wiki/Syntax.
137+
groups:
138+
- title: Features
139+
order: 0
140+
regexp: '^.*?feat(ure)?(\([[:word:]]+\))??!?:.+$'
141+
- title: "Bug fixes"
142+
order: 1
143+
regexp: '^.*?(bug(fix)?|fix)(\([[:word:]]+\))??!?:.+$'
144+
- title: Documentation
145+
order: 2
146+
regexp: "^.*?doc(s|umentation).*"
147+
- title: Go
148+
order: 3
149+
regexp: "^.*?go: "
150+
- title: Others
151+
order: 999
152+
153+
filters:
154+
# Commit messages matching the regexp listed here will be removed from
155+
# the changelog
156+
#
157+
# Matches are performed against the first line of the commit message only,
158+
# prefixed with the commit SHA1, usually in the form of
159+
# `<abbrev-commit>[:] <title-commit>`.
160+
exclude:
161+
- "^.*?Merge pull request "
162+
- "^.*?test(ing)?"
163+
164+
# Commit messages matching the regexp listed here will be the only ones
165+
# added to the changelog
166+
#
167+
# If include is not-empty, exclude will be ignored.
168+
#
169+
# Matches are performed against the first line of the commit message only,
170+
# prefixed with the commit SHA1, usually in the form of
171+
# `<abbrev-commit>[:] <title-commit>`.
172+
#
173+
# Since: v1.19
174+
#include:
175+
# - "^feat:"

0 commit comments

Comments
 (0)