Commit 8a3234d
Changed files (2)
.github
workflows
.github/workflows/release.yaml
@@ -1,5 +1,5 @@
---
-name: goreleaser
+name: Release
on:
push:
@@ -10,7 +10,7 @@ permissions:
contents: write
jobs:
- goreleaser:
+ release-binary:
runs-on: ubuntu-latest
steps:
- name: Checkout
@@ -21,11 +21,13 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: stable
- - name: Run GoReleaser
+ - name: Install cross-compiler for linux/arm64
+ run: sudo apt install gcc-aarch64-linux-gnu
+ - name: Release
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: "~> v2"
- args: release --clean
+ args: release --clean --config .goreleaser-linux.yaml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
.goreleaser.yaml → .goreleaser-linux.yaml
@@ -7,10 +7,22 @@ builds:
goos:
- linux
- windows
- - darwin
+# - darwin
+ goarch:
+ - amd64
+ - arm64
ldflags:
+ - -w -s
- -X github.com/kahnwong/swissknife/cmd.version={{.Version}}
-
+ overrides:
+ - goos: linux
+ goarch: amd64
+ env:
+ - CC=gcc
+ - goos: linux
+ goarch: arm64
+ env:
+ - CC=aarch64-linux-gnu-gcc
archives:
- format: tar.gz