2 Commits

Author SHA1 Message Date
Adrian Zürcher
784b812c99 another fix run to many spaces 2025-08-04 17:19:11 +02:00
Adrian Zürcher
a770875e2a another try change chckout repo 2025-08-04 17:18:00 +02:00

View File

@@ -1,37 +1,40 @@
name: Build
name: Build Go Multi-Platform
on:
push:
branches: [ main ]
branches:
- main
jobs:
build:
runs-on: self-hosted
runs-on: ubuntu-latest
steps:
- name: Install Latest Go
- name: Checkout repository
run: |
GO_VERSION=$(curl -s https://go.dev/VERSION?m=text)
wget https://go.dev/dl/${GO_VERSION}.linux-amd64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf ${GO_VERSION}.linux-amd64.tar.gz
export PATH=/usr/local/go/bin:$PATH
echo "Go version installed:"
go version
git clone https://gitea.tecamino.com/paadi/tecamino-proccessSupervisor.git .
- name: Checkout code
run: git clone https://your.gitea.server/user/repo.git .
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 'stable'
- name: Build for Linux/Windows (amd64 + arm)
- name: Build for Windows amd64
run: |
mkdir -p build
for GOOS in linux windows; do
for GOARCH in amd64 arm64; do
OUT=build/app-${GOOS}-${GOARCH}
[[ $GOOS == "windows" ]] && OUT="${OUT}.exe"
GOOS=$GOOS GOARCH=$GOARCH go build -o $OUT .
done
done
GOOS=windows GOARCH=amd64 go build -o build/myapp-windows-amd64.exe ./...
- name: List artifacts
run: ls -lh build
- 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