build: use goreleaser for building cross-compiled binaries and add riscv64 target (#2135)

* build: use goreleaser to cross-compile binaries for all platforms and archs

The main motivation behind it is because "gox" is unmaintained and archived
and it does not support "linux/riscv64" as a target.

Right now, goreleaser is only building the binaries, and I've tried to replicate
the exact same way the old script does.

In the future, if so desired, goreleaser could be used to further automate the
build and release pipeline by creating the release in GitHub.

* build: create binaries and OCI image for linux/riscv64
This commit is contained in:
Matheus Macabu
2024-08-20 13:09:12 +10:00
committed by GitHub
parent bbdd97482f
commit c46c1a7128
5 changed files with 63 additions and 7 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ jobs:
- name: Cross compile
run: |
sudo apt-get install rhash -y
go install github.com/mitchellh/gox@v1.0.1
go install github.com/goreleaser/goreleaser/v2@latest
mkdir -p build
cp yq.1 build/yq.1
./scripts/xcompile.sh