-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (35 loc) · 974 Bytes
/
build_cmd_app.yml
File metadata and controls
44 lines (35 loc) · 974 Bytes
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
38
39
40
41
42
43
44
name: Build cmd/app
on:
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: read
steps:
- uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: 'go.mod'
- name: Download dependencies
run: go mod download
- name: Create build directories
run: |
mkdir -p ./bin/linux_amd64
- name: Run audit (format, vet)
run: |
go fmt ./...
go vet ./...
- name: Build for linux/amd64
env:
SERVICE_NAME: goalkeepr
run: |
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build "-ldflags=-s" -o=./bin/linux_amd64/${{ env.SERVICE_NAME }} ./cmd/app
- name: Upload binary artifact
uses: actions/upload-artifact@v7
with:
name: goalkeepr-binary
path: ./bin/linux_amd64/goalkeepr