Adding CI/CD

This commit is contained in:
townandgown 2025-08-10 22:48:53 -05:00
parent 0a349cc406
commit 718d69c12a

View File

@ -0,0 +1,37 @@
name: Build Go Binaries
on:
push:
branches:
- main
jobs:
build:
runs-on: docker
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.23
- name: Cross-Compile
run: |
mkdir -p dist
for GOOS in linux windows darwin; do
for GOARCH in arm64 amd64; do
OUTPUT="dist/myapp_${GOOS}_${GOARCH}"
echo "Building ${OUTPUT}"
if [ "$GOOS" = "windows" ]; then
OUTPUT="${OUTPUT}.exe"
fi
GOOS=$GOOS GOARCH=$GOARCH go build -o $OUTPUT ./cmd/main
done
done
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: flo_download-binaries
path: dist