Skip to content

Commit

Permalink
Update build workflow to generate cross-platform builds
Browse files Browse the repository at this point in the history
  • Loading branch information
qpwedev committed Dec 11, 2023
1 parent 7ec97fb commit afb44b9
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,22 @@ on:
jobs:
build:
name: Build
runs-on: windows-latest
runs-on: ubuntu-latest
strategy:
matrix:
goos: [windows, darwin, linux]
goarch: [amd64]
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
Expand All @@ -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 }}

0 comments on commit afb44b9

Please sign in to comment.