diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..60e07ce --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: goreleaser + +on: + push: + tags: + - "v*" + +permissions: + contents: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: stable + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v6 + with: + distribution: goreleaser + version: "~> v2" + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 7d3b691..24f1a27 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -39,9 +39,7 @@ archives: formats: [zip] changelog: - use: github - format: "{{.SHA}}: {{.Message}} (@{{.AuthorUsername}})" - sort: asc + use: git abbrev: -1 filters: # Commit messages matching the regexp listed here will be removed from @@ -49,9 +47,12 @@ changelog: # # Matches are performed against the first line of the commit message only. exclude: + - "^chore:" - "^docs:" + - "^refactor:" - "^test:" - typo + - "Merge pull request" # Group commits messages by given regex and title. # Order value defines the order of the groups. @@ -68,7 +69,7 @@ changelog: regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$' order: 0 - title: "Bug fixes" - regexp: '^.*?bug(\([[:word:]]+\))??!?:.+$' + regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$' order: 1 - title: Others order: 999