This commit is contained in:
39
.gitea/workflows/build-multi-plaform.yaml
Normal file
39
.gitea/workflows/build-multi-plaform.yaml
Normal 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
|
Reference in New Issue
Block a user