From 23a8b0401fff91b21ae2832d4a20dd89661670e1 Mon Sep 17 00:00:00 2001 From: WaterLemons2k <62788816+WaterLemons2k@users.noreply.github.com> Date: Mon, 8 Apr 2024 22:22:27 +0800 Subject: [PATCH] fix(goreleaser): add build for Android (#1076) According to golang/go@58f6022, the `bad system call` bug on Termux should be fixed when GOOS is android. Test passed on Termux. --- .goreleaser.yml | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index e27603c42..08becbf41 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -12,12 +12,13 @@ builds: flags: - -trimpath goos: + - android - linux - windows - darwin - freebsd goarch: - - 386 + - '386' - amd64 - arm - arm64 @@ -26,16 +27,25 @@ builds: - mips64 - mips64le goarm: - - 5 - - 6 - - 7 + - '5' + - '6' + - '7' gomips: - hardfloat - softfloat + ignore: + # we only need the arm64 build on android + - goos: android + goarch: arm + - goos: android + goarch: '386' + - goos: android + goarch: amd64 + ldflags: - -s -w -X main.version={{.Tag}} -X main.buildTime={{.Date}} archives: - # use zip for windows archives + # use zip for windows archives - format_overrides: - goos: windows format: zip @@ -52,7 +62,7 @@ archives: checksum: name_template: 'checksums.txt' snapshot: - name_template: "{{ .Tag }}-next" + name_template: '{{ .Tag }}-next' changelog: sort: asc filters: