From 953e1921d473d4c7600e4f4a6d15cd82fc8e9fb9 Mon Sep 17 00:00:00 2001 From: Leandro Ferreira Date: Sat, 26 Oct 2024 11:52:01 -0300 Subject: [PATCH] update automatic builder --- .github/workflows/goreleaser.yml | 24 +++++++++++++++++++++--- .goreleaser.yaml | 7 ++++++- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index 63930ba..7aaff72 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -9,7 +9,7 @@ permissions: contents: write jobs: - goreleaser: + build-linux-windows: runs-on: ubuntu-latest steps: - name: Checkout @@ -18,11 +18,29 @@ jobs: fetch-depth: 0 - name: Set up Go uses: actions/setup-go@v5 - - name: Run GoReleaser + - name: Run GoReleaser for Linux and Windows uses: goreleaser/goreleaser-action@v6 with: distribution: goreleaser version: "~> v2" - args: release --clean + args: release --clean --skip-publish --skip-validate --id=build-linux-windows + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + build-macos: + runs-on: macos-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up Go + uses: actions/setup-go@v5 + - name: Run GoReleaser for macOS + uses: goreleaser/goreleaser-action@v6 + with: + distribution: goreleaser + version: "~> v2" + args: release --clean --skip-publish --skip-validate --id=build-macos env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 6f2ad44..1a4c58b 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -6,10 +6,15 @@ before: - go generate ./... builds: - - id: build + - id: build-linux-windows goos: - windows - linux + goarch: + - amd64 + - arm64 + - id: build-macos + goos: - darwin goarch: - amd64