diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..9ae1ce7 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,26 @@ +name: "release a version" +on: + push: + tags: + - 'v*' +permissions: + contents: write +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # it is required fot the changelog to work correctly + - uses: actions/setup-go@v5 + with: + go-version: 1.22 + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v5 + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + with: + distribution: goreleaser + version: latest + args: release --debug --clean + diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..4070232 --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,35 @@ +# This is an example .goreleaser.yml file with some sensible defaults. +# Make sure to check the documentation at https://goreleaser.com +builds: + - # If true, skip the build. + # Useful for library projects. + skip: true +changelog: + sort: asc + use: github + filters: + exclude: + - '^Merge' + groups: + - title: 'New Features' + regexp: "^.*feat.*:+.*$" + order: 100 + - title: 'Bug Fixes' + regexp: "^.*fix.*:+.*$" + order: 200 + - title: 'Dependency Updates' + regexp: "^.*(feat|fix)\\(deps\\)*:+.*$" + order: 300 + - title: 'Documentation Updates' + regexp: "^.*docs.*:+.*$" + order: 400 + - title: Other work + order: 9999 +release: + footer: | + **Full Changelog**: https://github.com/shipengqi/action/compare/{{ .PreviousTag }}...{{ .Tag }} + + +# modelines, feel free to remove those if you don't want/use them: +# yaml-language-server: $schema=https://goreleaser.com/static/schema.json +# vim: set ts=2 sw=2 tw=0 fo=cnqoj