Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(goreleaser): Update changelog section of .goreleaser.yml #381

Merged
merged 2 commits into from
Apr 21, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
MatrixCrawler marked this conversation as resolved.
Show resolved Hide resolved

# 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:"