From 91cf69f9f54222f519cb0c9e64145d37adb9719d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20L=C3=A9one?= Date: Thu, 27 Jun 2024 18:22:23 +0200 Subject: [PATCH 1/2] chore: update goreleaser and include a check --- .github/workflows/release.yml | 27 ++++++++++++++++----------- .goreleaser.yml | 3 ++- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b35c96506..440e25404 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,31 +18,36 @@ jobs: goreleaser: runs-on: ubuntu-latest steps: - - - name: Checkout + - name: Checkout uses: actions/checkout@v4 - - - name: Unshallow + + - name: Unshallow run: git fetch --prune --unshallow - - - name: Set up Go + + - name: Set up Go uses: actions/setup-go@v5 with: go-version: 1.22 - - - name: Import GPG key + + - name: Import GPG key id: import_gpg uses: crazy-max/ghaction-import-gpg@v6 with: gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} passphrase: ${{ secrets.GPG_PASSPHRASE }} fingerprint: ${{ secrets.GPG_FINGERPRINT }} - - - name: Run GoReleaser + + - name: Check goreleaser uses: goreleaser/goreleaser-action@v5 with: version: latest - args: release --rm-dist + args: check + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v5 + with: + version: latest + args: release env: GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml index ec213b62e..8aa27cf69 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,5 +1,6 @@ # Visit https://goreleaser.com for documentation on how to customize this # behavior. +version: 2 before: hooks: - go mod tidy @@ -50,4 +51,4 @@ release: # Manually examine the release before its live draft: true changelog: - skip: false + use: github-native From fc82da26e0a355c113466e6833b038b883f10b53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jules=20Cast=C3=A9ran?= Date: Mon, 1 Jul 2024 14:25:11 +0200 Subject: [PATCH 2/2] Apply suggestions from code review --- .github/workflows/release.yml | 2 +- .goreleaser.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 440e25404..1d4ebaf4e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,7 +44,7 @@ jobs: args: check - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v5 + uses: goreleaser/goreleaser-action@v6 with: version: latest args: release diff --git a/.goreleaser.yml b/.goreleaser.yml index 8aa27cf69..f1d8a75b2 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -51,4 +51,4 @@ release: # Manually examine the release before its live draft: true changelog: - use: github-native + use: github