From a466da504941e4c59b931c1552e341f9ba1e97e9 Mon Sep 17 00:00:00 2001 From: George Blue Date: Mon, 1 Jul 2024 12:25:09 +0100 Subject: [PATCH] chore: use GoReleaser to create GitHub releases on tags (#316) [#187721512](https://www.pivotaltracker.com/story/show/187721512) --- .github/workflows/release.yml | 27 +++++++++++++++++++++++++++ .goreleaser.yaml | 22 ++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 .goreleaser.yaml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..e0562182 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,27 @@ +name: goreleaser + +on: + push: + tags: + - 'v*' + +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: 'oldstable' + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v6 + with: + distribution: goreleaser + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 00000000..774dde9a --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,22 @@ +version: 2 +builds: [] +archives: [] +changelog: + sort: asc + groups: + - title: 'Breaking Changes' + regexp: "^.*feat![(\\w)]*:+.*$" + order: 0 + - title: 'Features' + regexp: "^.*feat[(\\w)]*:+.*$" + order: 1 + - title: 'Bug fixes' + regexp: "^.*fix[(\\w)]*:+.*$" + order: 2 + - title: 'Dependency updates' + regexp: "^.*(deps)[(\\w)]*:+.*$" + order: 3 + - title: Others + order: 999 +checksum: + algorithm: sha1