Skip to content

Commit 27d6e09

Browse files
committed
Build multiplatform
1 parent 8e42231 commit 27d6e09

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

.github/workflows/build.yml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,35 @@ on:
1010
jobs:
1111
build:
1212
runs-on: ubuntu-20.04
13+
strategy:
14+
matrix:
15+
include:
16+
- goos: darwin
17+
goarch: amd64
18+
goopts: ""
19+
filename: git-backup-darwin-intel
20+
- goos: darwin
21+
goarch: arm64
22+
goopts: ""
23+
filename: git-backup-darwin-m1
24+
- goos: linux
25+
goarch: amd64
26+
goopts: ""
27+
filename: git-backup-linux-x64
28+
- goos: linux
29+
goarch: arm64
30+
goopts: ""
31+
filename: git-backup-linux-arm64
32+
- goos: linux
33+
goarch: arm
34+
goopts: GOARM=7
35+
filename: git-backup-linux-armv7
1336
steps:
1437
- uses: actions/checkout@v2
1538
- uses: actions/setup-go@v2
1639
with:
1740
go-version: '^1.17.8'
18-
- run: go build ./cmd/git-backup
41+
- run: ${{ matrix.goopts }} go build ./cmd/${{ matrix.filename }}
42+
env:
43+
GOOS: ${{ matrix.goos }}
44+
GOARCH: ${{ matrix.goarch }}

0 commit comments

Comments
 (0)