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:
parent
2fcd61ae81
commit
1c29f9926a
|
|
@ -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 }}
|
||||||
Loading…
Reference in New Issue