Skip to content

ci(release): refuse a tag that does not match the committed version - #33

Merged
akosidencio merged 1 commit into
devfrom
ci/release-version-guard
Nov 27, 2026
Merged

akosidencio merged 1 commit into
devfrom
ci/release-version-guard

Conversation

@akosidencio

Copy link
Copy Markdown
Member

Found in the v0.4.0 release-gate review. Workflow-only change; no product code.

Problem

build-binaries compiles from the committed Cargo.toml version, and publish-npm only rewrites package.json files from the tag (bump-version.js runs after the binaries are built). Tagging v0.4.0 on the current tree, which is still 0.3.3, would publish npm 0.4.0 packages whose binaries report 0.3.3: daemon /api version, runs.version, MCP serverInfo, user agent and banners. Tags v0.3.0–v0.3.3 avoided this with a manual bump commit, but nothing enforced it.

Change

  • quality fails first unless the tag equals both the Cargo.toml workspace version and npm/tailflow/package.json's version.
  • --locked on release clippy, test and both build paths, as ci.yml already does.
  • A SHA256SUMS file covering every tarball and .exe is attached to the GitHub Release. The .exe files are now uploaded from dist/; the asset names are unchanged.

Checked

  • The guard script, extracted from the YAML and run on this tree: v0.3.3 passes; v0.4.0 and an empty tag fail.
  • actionlint is clean. sha256sum -- … > SHA256SUMS / -c was round-tripped locally.
  • This workflow only runs on a tag, so the publish path itself is not exercised by this PR.

Not changed (left for owner decision): pinning actions to SHAs, npm@latest in the publish job, cross from git HEAD, and rc tags publishing to npm latest.

build-binaries compiles from the committed Cargo.toml version, and the
publish job only rewrites package.json files from the tag. Tagging v0.4.0
on a tree still at 0.3.3 would therefore publish npm 0.4.0 packages whose
binaries report 0.3.3 (daemon /api version, runs.version, MCP serverInfo,
user agent, banners). v0.3.0-v0.3.3 avoided this with a manual bump commit,
but nothing enforced it.

- quality: fail first unless the tag equals both Cargo.toml's workspace
  version and npm/tailflow/package.json's version.
- Build, clippy and test with --locked, as ci.yml already does.
- Attach SHA256SUMS covering every tarball and .exe on the GitHub Release.

Checked locally: the guard passes for v0.3.3 and fails for v0.4.0 and an
empty tag on the current tree; actionlint is clean.
@akosidencio
akosidencio merged commit 1faf106 into dev Nov 27, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant