Skip to content

Commit ac7b2d3

Browse files
committed
Update GitHub Actions workflow to build for all platforms
1 parent cb5dd0d commit ac7b2d3

1 file changed

Lines changed: 36 additions & 2 deletions

File tree

.github/workflows/go.yml

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
# Build for raspberry pi
21
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
32

4-
name: Build and upload for raspberry pi 0 w v1
3+
name: Build and upload for all platforms
54

65
on:
76
push:
@@ -25,7 +24,42 @@ jobs:
2524
GOARCH: arm
2625
GOARM: 6
2726
run: go build -o simpleprint_linux_arm6
27+
- name: Build for linux/armV7
28+
env:
29+
CGO_ENABLED: 0
30+
GOOS: linux
31+
GOARCH: arm
32+
GOARM: 7
33+
run: go build -o simpleprint_linux_arm7
34+
- name: Build for linux/amd64
35+
env:
36+
CGO_ENABLED: 0
37+
GOOS: linux
38+
GOARCH: amd64
39+
run: go build -o simpleprint_linux_amd64
40+
- name: Build for macos
41+
env:
42+
CGO_ENABLED: 0
43+
GOOS: darwin
44+
GOARCH: amd64
45+
run: go build -o simpleprint_darwin_amd64
46+
- name: Build for windows
47+
env:
48+
CGO_ENABLED: 0
49+
GOOS: windows
50+
GOARCH: amd64
51+
run: go build -o simpleprint_windows_amd64
52+
2853
- uses: actions/upload-artifact@v4
2954
with:
3055
name: Releases
3156
path: simpleprint_linux_arm6
57+
- name: Upload release
58+
uses: softprops/action-gh-release@v2
59+
with:
60+
files: |
61+
simpleprint_linux_arm6
62+
simpleprint_linux_arm7
63+
simpleprint_linux_amd64
64+
simpleprint_darwin_amd64
65+
simpleprint_windows_amd64

0 commit comments

Comments
 (0)