From b4397140a7107a17726d5d5215bf8dd0778eb454 Mon Sep 17 00:00:00 2001 From: appleboy Date: Mon, 1 Apr 2024 20:55:24 +0800 Subject: [PATCH] chore: refactor changelog regex patterns and exclusions - Update the build configuration to skip the build using a comment - Change the `changelog` use from `git` to `github` - Modify the regex patterns for `Features`, `Bug fixes`, and `Enhancements` titles in the changelog - Add a new regex pattern for the `Refactor` title in the changelog - Update the excluded items in the changelog to include `docs` and `CICD` with corrected quotes Signed-off-by: appleboy --- .goreleaser.yaml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index e435e56a..7a0a8f53 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,8 +1,7 @@ project_name: gin builds: - - - # If true, skip the build. + - # If true, skip the build. # Useful for library projects. # Default is false skip: true @@ -21,7 +20,7 @@ changelog: # - `github-native`: uses the GitHub release notes generation API, disables the groups feature. # # Defaults to `git`. - use: git + use: github # Sorts the changelog by the commit's messages. # Could either be asc, desc or empty @@ -36,13 +35,16 @@ changelog: # Default is no groups. groups: - title: Features - regexp: "^.*feat[(\\w)]*:+.*$" + regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$' order: 0 - - title: 'Bug fixes' - regexp: "^.*fix[(\\w)]*:+.*$" + - title: "Bug fixes" + regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$' order: 1 - - title: 'Enhancements' - regexp: "^.*chore[(\\w)]*:+.*$" + - title: "Refactor" + regexp: '^.*?refactor(\([[:word:]]+\))??!?:.+$' + order: 2 + - title: "Enhancements" + regexp: '^.*?chore(\([[:word:]]+\))??!?:.+$' order: 2 - title: Others order: 999 @@ -52,6 +54,6 @@ changelog: # the changelog # Default is empty exclude: - - '^docs' - - 'CICD' + - "^docs" + - "CICD" - typo