From 5114406215cf00fd25cc98c7f5bc260a9ad2f840 Mon Sep 17 00:00:00 2001 From: qpwedev Date: Mon, 11 Dec 2023 18:54:41 +0100 Subject: [PATCH] Update build workflow to generate cross-platform builds --- .github/workflows/build.yml | 42 ++++++++----------------------------- 1 file changed, 9 insertions(+), 33 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 506d78e..6a8394a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,42 +1,18 @@ -name: Go Build +# workflow name +name: Generate release-artifacts +# on events on: push: branches: [main] pull_request: branches: [main] +# workflow tasks jobs: - build: - name: Build - runs-on: windows-latest - strategy: - matrix: - goos: [windows, darwin, linux] - goarch: [amd64] - include: - - goos: darwin - goarch: arm64 - + generate: + name: Generate cross-platform builds + runs-on: ubuntu-latest steps: - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: "1.20" - - - name: Check out code - uses: actions/checkout@v2 - - - name: Build - run: | - if ($env:matrix_goos -eq "windows") { - go build - } else { - $env:GOOS=$env:matrix_goos; $env:GOARCH=$env:matrix_goarch; go build - } - - - name: Upload artifact - uses: actions/upload-artifact@v2 - with: - name: build-${{ matrix.goos }}-${{ matrix.goarch }} - path: ./ton-20-minter + - name: go-cross-build + uses: thatisuday/go-cross-build@v1.0.2