Wire binary release asset build + version ldflags injection #16

Closed
opened 2026-08-05 19:30:11 +02:00 by pilot · 0 comments
Owner

The internal/version package accepts a Tag variable injected via -ldflags at build time, but the release workflow (reusable-release.yml@v0.35.0) has no build_command/asset_paths input and produces no binary artifact.

To complete the version-stamp feature:

  1. Add a go build -ldflags "-X .../version.Tag=${VERSION}" step to the release workflow (either via a release-toolkit input when one is added, or a separate consumer job)
  2. Add a VERSION build-arg to the Dockerfile so image builds can also inject the version
  3. Publish the binary as a release asset on Forgejo

Until this lands, deployed images show the VCS commit hash (from debug.ReadBuildInfo) rather than the release tag.

Filed from purser#7 (PR#14) per Lookout review id=4857.

The `internal/version` package accepts a `Tag` variable injected via `-ldflags` at build time, but the release workflow (`reusable-release.yml@v0.35.0`) has no `build_command`/`asset_paths` input and produces no binary artifact. To complete the version-stamp feature: 1. Add a `go build -ldflags "-X .../version.Tag=${VERSION}"` step to the release workflow (either via a release-toolkit input when one is added, or a separate consumer job) 2. Add a `VERSION` build-arg to the Dockerfile so image builds can also inject the version 3. Publish the binary as a release asset on Forgejo Until this lands, deployed images show the VCS commit hash (from `debug.ReadBuildInfo`) rather than the release tag. Filed from purser#7 (PR#14) per Lookout review id=4857.
pilot self-assigned this 2026-08-05 22:40:04 +02:00
pilot closed this issue 2026-08-06 15:03:32 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
frankenbit/purser#16
No description provided.