Documentation
¶
Overview ¶
Command assert-trusted-stamp asserts the GoReleaser-built binary in dist/ is version-stamped and TRUSTED. Shared by ci.yml (snapshot, every PR) and release.yml (the real tagged build, before anything is published) — one program, two callers, so the two workflows cannot drift apart.
WHY THIS EXISTS. A release-breaking regression shipped undetected on 2026-07-23: isReleaseVersion wrongly required a leading "v", but GoReleaser's {{ .Version }} stamps the tag with "v" stripped. Every released binary resolved to a STAMPED-BUT-UNTRUSTED string — never the bare "dev" sentinel, so a "not dev" check passed — while still being annotated "(unreleased build)" and failing every engine: constraint.
So it asserts the reported version matches what GoReleaser actually stamped (dist/metadata.json) and carries no unreleased annotation. There is no separate `ver == "dev"` guard: the exact-match check already exits for any version that is not the stamped one, and the stamped one is never "dev".
Replaces .github/scripts/assert-trusted-stamp.sh.