add build workflow
Some checks failed
Build Go Multi-Platform / build (push) Has been cancelled

This commit is contained in:
Adrian Zürcher
2025-08-04 17:04:13 +02:00
parent 21b41de886
commit b73b6ee0ed

View File

@@ -0,0 +1,39 @@
name: Build Go Multi-Platform
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 'stable'
- name: Build for Windows amd64
run: |
GOOS=windows GOARCH=amd64 go build -o build/myapp-windows-amd64.exe ./...
- name: Build for Linux amd64
run: |
GOOS=linux GOARCH=amd64 go build -o build/myapp-linux-amd64 ./...
- name: Build for Linux ARM64
run: |
GOOS=linux GOARCH=arm64 go build -o build/myapp-linux-arm64 ./...
- name: Build for Linux ARMv6 (Raspberry Pi)
run: |
GOOS=linux GOARCH=arm GOARM=6 go build -o build/myapp-linux-armv6 ./...
- name: List build artifacts
run: |
ls -lh build