diff --git a/.gitea/workflows/build-multi-plaform.yaml b/.gitea/workflows/build-multi-plaform.yaml new file mode 100644 index 0000000..c3bd240 --- /dev/null +++ b/.gitea/workflows/build-multi-plaform.yaml @@ -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