From 4a682bd97b25b28ef9a480618822cf58babc7c51 Mon Sep 17 00:00:00 2001 From: appleboy Date: Sun, 19 Jan 2025 22:14:48 +0800 Subject: [PATCH] ci: update GoReleaser configuration and changelog settings - Replace `go-version-file` and `check-latest` with `go-version` in GoReleaser workflow - Update GoReleaser action from v5 to v6 - Remove `project_name` from GoReleaser configuration - Change changelog `skip` to `disable` and set it to false - Change changelog `use` from `git` to `github` - Update regular expressions for changelog sections to include hyphens in parentheses - Add new changelog sections for `Refactor`, `Build process updates`, and `Documentation updates` - Remove `filters` section from changelog configuration Signed-off-by: appleboy --- .github/workflows/goreleaser.yml | 5 ++--- .goreleaser.yaml | 31 ++++++++++++++----------------- 2 files changed, 16 insertions(+), 20 deletions(-) diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index 8415626..22edf45 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -19,10 +19,9 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version-file: "go.mod" - check-latest: true + go-version: "^1" - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v5 + uses: goreleaser/goreleaser-action@v6 with: # either 'goreleaser' (default) or 'goreleaser-pro' distribution: goreleaser diff --git a/.goreleaser.yaml b/.goreleaser.yaml index c8a7b93..72e3918 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,5 +1,3 @@ -project_name: queue - builds: - # If true, skip the build. # Useful for library projects. @@ -9,8 +7,7 @@ builds: changelog: # Set it to true if you wish to skip the changelog generation. # This may result in an empty release notes on GitHub/GitLab/Gitea. - # Default is false - skip: true + disable: false # Changelog generation implementation to use. # @@ -21,7 +18,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,22 +33,22 @@ changelog: # Default is no groups. groups: - title: Features - regexp: "^.*feat[(\\w)]*:+.*$" + regexp: "^.*feat[(\\w-)]*:+.*$" order: 0 - title: "Bug fixes" - regexp: "^.*fix[(\\w)]*:+.*$" + regexp: "^.*fix[(\\w-)]*:+.*$" order: 1 - title: "Enhancements" - regexp: "^.*chore[(\\w)]*:+.*$" + 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