From b4eb74e389a3bb4eb6a4225e9bccd8744203b895 Mon Sep 17 00:00:00 2001 From: Anish Athalye Date: Mon, 17 Jul 2023 10:29:09 -0400 Subject: [PATCH] Switch to goreleaser-cross --- .github/workflows/release.yml | 6 +++--- .goreleaser.yml | 40 +++++++++++++++++++++++------------ 2 files changed, 29 insertions(+), 17 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b405466..79b58b1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,9 +13,9 @@ jobs: needs: test runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: docker://mailchain/goreleaser-xcgo:latest + - uses: actions/checkout@v3 + - uses: docker://goreleaser/goreleaser-cross:v1.20.6 with: - args: --rm-dist + args: --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml index 4934baf..451c974 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -6,23 +6,47 @@ builds: - id: periscope-darwin-amd64 main: ./cmd/psc/ binary: psc + goos: + - darwin + goarch: + - amd64 env: - CGO_ENABLED=1 - CC=o64-clang - CXX=o64-clang++ + - id: periscope-darwin-arm64 + main: ./cmd/psc/ + binary: psc goos: - darwin goarch: - - amd64 + - arm64 + env: + - CGO_ENABLED=1 + - CC=oa64-clang + - CXX=oa64-clang++ - id: periscope-linux-amd64 main: ./cmd/psc/ binary: psc + goos: + - linux + goarch: + - amd64 env: - CGO_ENABLED=1 + - CC=x86_64-linux-gnu-gcc + - CXX=x86_64-linux-gnu-g++ + - id: periscope-linux-arm64 + main: ./cmd/psc/ + binary: psc goos: - linux goarch: - - amd64 + - arm64 + env: + - CGO_ENABLED=1 + - CC=aarch64-linux-gnu-gcc + - CXX=aarch64-linux-gnu-g++ checksum: name_template: 'checksums.txt' snapshot: @@ -36,18 +60,6 @@ archives: - goos: windows format: zip name_template: "{{.ProjectName}}-v{{.Version}}-{{.Os}}-{{.Arch}}" - replacements: - amd64: 64bit - 386: 32bit - arm: ARM - arm64: ARM64 - darwin: macOS - linux: Linux - windows: Windows - openbsd: OpenBSD - netbsd: NetBSD - freebsd: FreeBSD - dragonfly: DragonFlyBSD files: - README.md - LICENSE.txt