ci: add GitHub Actions build workflow for Linux and Windows

- Build on push/PR to main
- Cross-compile for linux/amd64 and windows/amd64
- Upload build artifacts
This commit is contained in:
lite 2026-05-17 16:27:44 -04:00
parent 2fcd61ae81
commit 1c29f9926a
1 changed files with 33 additions and 0 deletions

33
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,33 @@
name: Build
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, windows]
goarch: [amd64]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: go build -o verifactu-api-${{ matrix.goos }}-${{ matrix.goarch }} .
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: verifactu-api-${{ matrix.goos }}-${{ matrix.goarch }}
path: verifactu-api-${{ matrix.goos }}-${{ matrix.goarch }}