Skip to content

build static binary #12

build static binary

build static binary #12

Workflow file for this run

name: Go CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.22
- name: Install dependencies
run: go mod tidy
- name: Build
run: go build -ldflags '-extldflags "-static"' -o ./output/ssmserver ./cmd/server
- name: Run tests
run: go test -v ./...
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: ssmserver
path: ./output/ssmserver