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.
This commit is contained in:
sid 2026-04-19 21:04:57 -06:00
parent a6cf9a7096
commit d4b5b79541
10 changed files with 188 additions and 13 deletions

View file

@ -5,6 +5,36 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Development
- Switched to standard semver tags (`v0.3.1`, `v0.4.0`, …); retired
letter-suffix scheme (`v0.3.0a``v0.3.0f`) which Go's module resolver
ignored, leaving `go install @latest` pointing at the pre-migration
`v0.3.0` tag.
- Version string is now injected at build time via `-ldflags`; the
hardcoded constant in `cmd/root.go` has been replaced with a
`var version = "dev"` fallback. `make build` derives the version from
`git describe --tags --always --dirty`.
- Added `.goreleaser.yaml` for multi-platform release builds
(linux/darwin/windows/freebsd × amd64/arm64/arm) with SHA256
checksums and auto-generated release notes.
- Added `.gitea/workflows/release.yml` that publishes release artifacts
to the Forgejo release page on tag push.
- Aligned CI Go version (`1.24`) with `go.mod`; previously CI ran on
`1.21` while `go.mod` required `1.24`.
## [0.3.1] - 2026-04-19
### Fixed
- `go install forgejo.zerova.net/public/fgj-sid@latest` now resolves
correctly. Previous releases used letter-suffix tags (`v0.3.0a``f`)
which are not valid Go module versions and were ignored by the
module resolver, leaving `@latest` pinned to `v0.3.0` — a commit
that predates the module-path migration from `codeberg.org/romaintb/fgj`.
## [0.3.0c] - 2026-03-21
### Added