Skip to content

Commit

Permalink
feat(goreleaser): Update changelog section of .goreleaser.yml (#381)
Browse files Browse the repository at this point in the history
* feat(goreleaser): Update `changelog` section of `.goreleaser.yml`

* Unify regeps format by adding ^.*? prefix to `filters.exclude`
  • Loading branch information
yermulnik authored Apr 21, 2024
1 parent 9059ac6 commit c18b5d7
Showing 1 changed file with 78 additions and 7 deletions.
85 changes: 78 additions & 7 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@ builds:
goarch: arm64
checksum:
name_template: '{{ .ProjectName }}_{{.Env.RELEASE_VERSION}}_checksums.txt'
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'

archives:
- id: archives
Expand Down Expand Up @@ -70,7 +64,7 @@ brews:

# Folder inside the repository to put the formula.
# Default is the root folder.
folder: Formula
directory: Formula

# Caveats for the user of your binary.
# Default is empty.
Expand Down Expand Up @@ -102,3 +96,80 @@ brews:
# Default is 'bin.install "program"'.
install: |
bin.install "tfswitch"
changelog:
# Set this to true if you don't want any changelog at all.
# Templates: allowed
disable: "{{ .Env.NO_CREATE_CHANGELOG }}"

# 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

# Sorts the changelog by the commit's messages.
# Could either be asc, desc or empty
# Empty means 'no sorting', it'll use the output of `git log` as is.
sort:

# Max commit hash length to use in the changelog.
#
# 0: use whatever the changelog implementation gives you
# -1: remove the commit hash from the changelog
# any other number: max length.
abbrev: -1

# 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.
#
# Matches are performed against the first line of the commit message only,
# prefixed with the commit SHA1, usually in the form of
# `<abbrev-commit>[:] <title-commit>`.
# Groups are disabled when using github-native, as it already groups things by itself.
# Regex use RE2 syntax as defined here: https://github.com/google/re2/wiki/Syntax.
groups:
- title: Features
order: 0
regexp: '^.*?feat(ure)?(\([[:word:]]+\))??!?:.+$'
- title: "Bug fixes"
order: 1
regexp: '^.*?(bug(fix)?|fix)(\([[:word:]]+\))??!?:.+$'
- title: Documentation
order: 2
regexp: "^.*?doc(s|umentation).*"
- title: Go
order: 3
regexp: "^.*?go: "
- title: Others
order: 999

filters:
# Commit messages matching the regexp listed here will be removed from
# the changelog
#
# Matches are performed against the first line of the commit message only,
# prefixed with the commit SHA1, usually in the form of
# `<abbrev-commit>[:] <title-commit>`.
exclude:
- "^.*?Merge pull request "
- "^.*?test(ing)?"

# Commit messages matching the regexp listed here will be the only ones
# added to the changelog
#
# If include is not-empty, exclude will be ignored.
#
# Matches are performed against the first line of the commit message only,
# prefixed with the commit SHA1, usually in the form of
# `<abbrev-commit>[:] <title-commit>`.
#
# Since: v1.19
#include:
# - "^feat:"

0 comments on commit c18b5d7

Please sign in to comment.