fj/.goreleaser.yaml
sid d4b5b79541 feat(release): v0.4.0 foundations — ldflags version + goreleaser + CI Go 1.24
- Move version out of cmd/root.go hardcode into an ldflags-injected
  var. Makefile derives from 'git describe --tags --always --dirty';
  plain 'go build' / 'go run' get 'dev'. Release builds will get the
  tag via goreleaser.
- Add .goreleaser.yaml: multi-platform (linux/darwin/windows/freebsd ×
  amd64/arm64/arm) builds with SHA256 checksums, tar.gz/zip archives,
  forgejo release publishing. No GPG/S3 yet — deferred until a key is
  provisioned.
- Add .gitea/workflows/release.yml to run goreleaser on tag push.
  Uses built-in GITEA_TOKEN with override via RELEASE_TOKEN secret.
- Align CI Go version with go.mod (1.24). Previously CI ran 1.21,
  which would have silently missed any 1.22+ feature use.
- Move itchyny/gojq from indirect to direct (it's used in api.go).
  Drop stale x/sys v0.33.0 entry from go.sum.
- Ignore dist/ and bin/ in .gitignore.
- CHANGELOG: document v0.3.1 fix and Unreleased development changes.
2026-04-19 21:04:57 -06:00

91 lines
1.7 KiB
YAML

# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
version: 2
project_name: fgj
before:
hooks:
- go mod tidy
builds:
- id: fgj
binary: fgj
main: .
env:
- CGO_ENABLED=0
flags:
- -trimpath
ldflags:
- -s -w -X "forgejo.zerova.net/public/fgj-sid/cmd.version={{ .Version }}"
goos:
- linux
- darwin
- windows
- freebsd
goarch:
- amd64
- arm64
- arm
goarm:
- "6"
- "7"
ignore:
- goos: darwin
goarch: arm
- goos: windows
goarch: arm
- goos: freebsd
goarch: arm
archives:
- id: default
name_template: >-
{{ .ProjectName }}-
{{- .Version }}-
{{- .Os }}-
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
formats: [tar.gz]
format_overrides:
- goos: windows
formats: [zip]
files:
- README.md
- LICENSE
- CHANGELOG.md
checksum:
name_template: "checksums.txt"
algorithm: sha256
snapshot:
version_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
use: git
filters:
exclude:
- "^docs:"
- "^test:"
- "^chore:"
- "^ci:"
- "Merge pull request"
- "Merge branch"
gitea_urls:
api: https://forgejo.zerova.net/api/v1
download: https://forgejo.zerova.net
release:
draft: false
prerelease: auto
mode: replace
header: |
## fgj {{ .Tag }}
Install with `go install forgejo.zerova.net/public/fgj-sid@{{ .Tag }}` or download a prebuilt binary below.
footer: |
**Full Changelog**: https://forgejo.zerova.net/public/fgj-sid/compare/{{ .PreviousTag }}...{{ .Tag }}