Skip to content

ci: guard release tag against Cargo.toml version (+ bump to 2.1.1) - #22

Merged
staehle merged 1 commit into
mainfrom
user/jstaehle/ci-version-guard
Jul 4, 2026
Merged

staehle merged 1 commit into
mainfrom
user/jstaehle/ci-version-guard

Conversation

@staehle

@staehle staehle commented Jul 4, 2026

Copy link
Copy Markdown
Owner

What

Fixes the version-drift problem behind the v2.1.1 release.

Root cause: release.yml triggers on tag push and builds whatever commit the tag points at. v2.1.1 was tagged from the webui on a commit whose Cargo.toml still said 2.1.0, so the published binary reports 2.1.0 from --version and the About dialog. The draft-release safeguard caught bad binaries, not a wrong version string.

Changes

  1. New verify-version job in release.yml that gates the build. It strips the v from the pushed tag and compares against the [package] version in Cargo.toml. Mismatch = the release fails before building, with a clear error telling you to bump Cargo.toml. A desynced release becomes impossible to publish.
  2. Bump Cargo.toml + Cargo.lock 2.1.0 -> 2.1.1 to reconcile the current drift with the already-published v2.1.1 tag.

Verification (local, full CI gate)

  • cargo fmt --all -- --check clean
  • cargo clippy --all-targets -- -D warnings clean
  • cargo test --locked 5 passed
  • All three workflow files validated as YAML

Notes

The in-app update checker (item 1 from the ticket) lands as a separate PR. An optional auto-tag-on-merge workflow (fully eliminate manual tagging) can follow if you want it.

Adds a verify-version job to release.yml that gates the build: if a
pushed vX.Y.Z tag does not match the [package] version in Cargo.toml,
the release fails before building instead of publishing a mislabeled
artifact. This is exactly the failure that shipped v2.1.1 as an
internally-2.1.0 binary.

Also reconciles the existing drift by bumping Cargo.toml (and Cargo.lock)
from 2.1.0 to 2.1.1 to match the already-published v2.1.1 tag.
@staehle
staehle merged commit 149f08e into main Jul 4, 2026
3 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