From cec7d49a5860b2b6b7624eb4364bd3e8bcf4e582 Mon Sep 17 00:00:00 2001 From: Leandro Ferreira Date: Sat, 26 Oct 2024 11:57:53 -0300 Subject: [PATCH] update automatic builder --- .github/workflows/goreleaser.yml | 28 +++++++++++++++++++++++++--- .goreleaser.yaml | 7 ++++++- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index 63930ba..e5b91fa 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,33 @@ jobs: fetch-depth: 0 - name: Set up Go uses: actions/setup-go@v5 - - name: Run GoReleaser + with: + go-version: '1.23' # Especifique a versão do Go conforme necessário + - name: Run GoReleaser for Linux and Windows + uses: goreleaser/goreleaser-action@v6 + with: + distribution: goreleaser + version: "~> v2" + args: release --clean --skip=publish,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 + with: + go-version: '1.23' # Especifique a versão do Go conforme necessário + - name: Run GoReleaser for macOS uses: goreleaser/goreleaser-action@v6 with: distribution: goreleaser version: "~> v2" - args: release --clean + args: release --clean --skip=publish,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