From afb44b98a01a1d521085a6dc6aa826cf561a041e 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 | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 506d78e..966e662 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,7 @@ on: jobs: build: name: Build - runs-on: windows-latest + runs-on: ubuntu-latest strategy: matrix: goos: [windows, darwin, linux] @@ -17,6 +17,14 @@ jobs: include: - goos: darwin goarch: arm64 + - goos: windows + goarch: amd64 + extension: .exe + - goos: linux + goarch: amd64 + exclude: + - goos: windows + goarch: arm64 steps: - name: Set up Go @@ -29,14 +37,15 @@ jobs: - name: Build run: | - if ($env:matrix_goos -eq "windows") { - go build - } else { - $env:GOOS=$env:matrix_goos; $env:GOARCH=$env:matrix_goarch; go build - } + export GOOS=${{ matrix.goos }} + export GOARCH=${{ matrix.goarch }} + go build -o ton-20-minter${{ matrix.extension }} + + - name: List output files + run: ls - name: Upload artifact uses: actions/upload-artifact@v2 with: name: build-${{ matrix.goos }}-${{ matrix.goarch }} - path: ./ton-20-minter + path: ./ton-20-minter${{ matrix.extension }}