From 5003a236c3cde27474d7c9cbd1ca7ef4bf56b1eb Mon Sep 17 00:00:00 2001 From: spwoodcock Date: Wed, 20 Nov 2024 22:30:42 +0000 Subject: [PATCH] build: use goreleaser-cross container img for gh release workflow --- .github/workflows/release.yml | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 154d0ae..e9a968a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,9 +1,8 @@ name: goreleaser on: - push: - tags: - - '*' + release: + types: [published] permissions: contents: write @@ -11,20 +10,20 @@ permissions: jobs: goreleaser: runs-on: ubuntu-latest + + container: + image: docker.io/goreleaser/goreleaser-cross:v1.23 + steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Set up Go - uses: actions/setup-go@v5 - - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v6 - with: - distribution: goreleaser - version: '~> v2' - args: release --clean + - name: Release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + # Required because of https://github.com/actions/checkout/issues/766 + git config --global --add safe.directory "${GITHUB_WORKSPACE}" + goreleaser release