-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (34 loc) · 941 Bytes
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Build
on:
push:
branches:
- main
pull_request:
jobs:
build:
strategy:
matrix:
os:
- linux
arch:
- amd64
- arm64
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: Test
run: go test -v
env:
CGO_ENABLED: "0"
- name: Build
run: go build -o bin/jobloader-${{ matrix.os }}-${{ matrix.arch }} -ldflags \
"-X github.com/brandond/jobloader/pkg/version/GitVersion=${{ github.ref_type == 'tag' && github.ref_name || 'dev' }} -X github.com/brandond/jobloader/pkg/version/GitCommit=${{ github.sha }} -extldflags '-static -lm -ldl -lz -lpthread'"
env:
CGO_ENABLED: "0"
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}