From 4eac81540c4e13aee046e1d2e12482c2a91bd7c8 Mon Sep 17 00:00:00 2001 From: Andrew Starr-Bochicchio Date: Fri, 28 Jun 2024 17:31:26 -0400 Subject: [PATCH] Update for goreleaser 2.0 --- .github/workflows/release.yml | 12 +++++++++--- .goreleaser.yml | 3 +-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7cbe2b56..4aa72c8a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,26 +24,32 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - name: Unshallow run: git fetch --prune --unshallow + - name: Set up Go uses: actions/setup-go@v2 with: go-version: "1.21.x" + - name: Describe plugin id: plugin_describe run: echo "::set-output name=api_version::$(go run . describe | jq -r '.api_version')" + - name: Import GPG key id: import_gpg uses: crazy-max/ghaction-import-gpg@v5 with: gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} passphrase: ${{ secrets.GPG_PASSPHRASE }} + - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v2 + uses: goreleaser/goreleaser-action@v6 with: - version: latest - args: release --rm-dist + distribution: goreleaser + version: "~> v2" + args: release --clean env: GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml index dff79904..f2fd10f3 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,5 +1,4 @@ -# This is an example goreleaser.yaml file with some defaults. -# Make sure to check the documentation at http://goreleaser.com +version: 2 env: - CGO_ENABLED=0 before: