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 5114406
Showing 1 changed file with 9 additions and 33 deletions.
42 changes: 9 additions & 33 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]

0 comments on commit 5114406

Please sign in to comment.