GoReleaser builds static binaries for linux/darwin on amd64/arm64, injecting version via ldflags. Version command prints the embedded version (defaults to "dev" for local builds). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
41 lines
626 B
YAML
41 lines
626 B
YAML
version: 2
|
|
|
|
before:
|
|
hooks:
|
|
- go mod tidy
|
|
|
|
builds:
|
|
- main: ./cmd/sgard
|
|
env:
|
|
- CGO_ENABLED=0
|
|
ldflags:
|
|
- -s -w -X main.version={{.Version}}
|
|
goos:
|
|
- linux
|
|
- darwin
|
|
goarch:
|
|
- amd64
|
|
- arm64
|
|
|
|
archives:
|
|
- formats: [binary]
|
|
name_template: >-
|
|
{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{- if .Arm }}v{{ .Arm }}{{ end }}_v{{ .Version }}
|
|
|
|
changelog:
|
|
sort: asc
|
|
filters:
|
|
exclude:
|
|
- "^docs:"
|
|
- "^test:"
|
|
|
|
release:
|
|
github:
|
|
owner: kisom
|
|
name: sgard
|
|
footer: >-
|
|
|
|
---
|
|
|
|
Released by [GoReleaser](https://github.com/goreleaser/goreleaser).
|