diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a355d3c..db62918 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,6 +43,11 @@ jobs: go-version: 1.21 cache: true + - name: OSXCross for CGO Support + run: | + wget -P ~ https://musl.cc/aarch64-linux-musl-cross.tgz + tar -xvf ~/aarch64-linux-musl-cross.tgz -C ~ + - name: Run GoReleaser uses: goreleaser/goreleaser-action@v3 with: diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 279c5a3..e968b62 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -9,6 +9,16 @@ builds: - linux goarch: - amd64 +- id: arm + ldflags: + - -extldflags=-static + env: + - CGO_ENABLED=1 + - CC=~/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc + binary: "{{ .ProjectName }}" + goos: + - linux + goarch: - arm64 dockers: - image_templates: