From 7b0813800398640b50c3729e6cad05fd22508292 Mon Sep 17 00:00:00 2001 From: George Blue Date: Fri, 28 Jun 2024 12:37:18 +0100 Subject: [PATCH] chore: use GoReleaser to create GitHub releases on tags [#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