diff --git a/.goreleaser.yml b/.goreleaser.yml index 6e9dd678..449e7893 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -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 @@ -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. @@ -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 + # `[:] `. + # 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 + # `[:] `. + 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 + # `[:] `. + # + # Since: v1.19 + #include: + # - "^feat:"