Changelog grouping with GoReleaser v1.1

Cascavel -

In the v1.1 release, GoReleaser introduced a new feature called “changelog groups”. This is a quick post to spread the word.

This feature allows you to “organize” your changelog in categories by using regular expressions.

Using it with use: github and some exclusion filters yields pretty good looking release notes:

An example release changelog.

An example release changelog.

Here’s a quick usage example:

# .goreleaser.yaml
changelog:
  sort: asc
  use: github
  filters:
    exclude:
    - Merge pull request
    - Merge remote-tracking branch
    - Merge branch
  groups:
    - title: 'New Features'
      regexp: "^.*feat[(\\w)]*:+.*$"
      order: 0
    - title: 'Bug fixes'
      regexp: "^.*fix[(\\w)]*:+.*$"
      order: 10
    - title: Other work
      order: 999

GoReleaser uses it on its own releases, so you can always poke around its .goreleaser.yaml config file. Also make sure to give the documentation a read!


Acknowledgements

This feature was added by @dirien in this PR! Thanks for all the hard work! 🙏

goreleaser golang semantic-versioning
Avatar photo Carlos is a Site Reliability Engineer who enjoys working on OpenSource. Twitter Tweet