From 5bd11c67c91f089ab6995822aa17eab434acab93 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Mon, 8 Apr 2024 14:15:02 +0800 Subject: [PATCH] chore: refine changelog generation and categorization - Change the changelog configuration to use `git` instead of `github` - Update the regular expressions for `feat` and `fix` changelog categories - Replace the `Refactor` changelog category with `Enhancements` and update its regular expression - Add new changelog categories for `Refactor`, `Build process updates`, and `Documentation updates` with specific ordering - Remove filters that excluded commits with messages matching certain patterns (e.g., `docs`, `CICD`, `typo`) from the changelog Signed-off-by: Bo-Yi Wu --- .goreleaser.yaml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 813cc01..f7c87a9 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -20,7 +20,7 @@ changelog: # - `github-native`: uses the GitHub release notes generation API, disables the groups feature. # # Defaults to `git`. - use: github + use: git # Sorts the changelog by the commit's messages. # Could either be asc, desc or empty @@ -35,22 +35,22 @@ changelog: # Default is no groups. groups: - title: Features - regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$' + regexp: "^.*feat[(\\w)]*:+.*$" order: 0 - title: "Bug fixes" - regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$' + regexp: "^.*fix[(\\w)]*:+.*$" order: 1 - - title: "Refactor" - regexp: '^.*?refactor(\([[:word:]]+\))??!?:.+$' + - title: "Enhancements" + regexp: "^.*chore[(\\w)]*:+.*$" order: 2 + - title: "Refactor" + regexp: "^.*refactor[(\\w)]*:+.*$" + order: 3 + - title: "Build process updates" + regexp: ^.*?(build|ci)(\(.+\))??!?:.+$ + order: 4 + - title: "Documentation updates" + regexp: ^.*?docs?(\(.+\))??!?:.+$ + order: 4 - title: Others order: 999 - - filters: - # Commit messages matching the regexp listed here will be removed from - # the changelog - # Default is empty - exclude: - - "^docs" - - "CICD" - - typo