From 06fdae4ab9026bfaa66c24ba98036c3f65940207 Mon Sep 17 00:00:00 2001 From: Jonas Plum Date: Tue, 2 Sep 2025 23:43:33 +0200 Subject: [PATCH] fix: adapt goreleaser for cross compilation (#1145) --- .github/workflows/goreleaser.yml | 16 +++++++++------- .goreleaser.yaml | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index ea683bf..56ec80b 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -28,10 +28,12 @@ jobs: registry: ghcr.io username: "securitybrewery" password: ${{ secrets.GITHUB_TOKEN }} - - uses: goreleaser/goreleaser-action@v6 - with: - distribution: goreleaser - version: '~> v2' - args: release --clean - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + - name: Run GoReleaser + run: | + docker run --rm --privileged \ + -v ${{ github.workspace }}:/workspace \ + -v /var/run/docker.sock:/var/run/docker.sock \ + -e CGO_ENABLED=1 \ + -e GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} \ + ghcr.io/goreleaser/goreleaser-cross:latest \ + release --clean \ No newline at end of file diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 704af5d..c1d7d85 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -6,7 +6,7 @@ before: builds: - env: - - CGO_ENABLED=0 + - CGO_ENABLED=1 goos: - linux - darwin