Repository navigation
ci: automate version bumps with scripts/release.sh + tag/version guard - #691
Merged
Merged
Conversation
scripts/release.sh bumps [workspace.package].version, refreshes Cargo.lock, commits and creates the signed annotated tag in one step, with preflight checks (clean tree, in sync with upstream, unused tag, optional green CI). release.yml now refuses to build a tag whose name does not match Cargo.toml (and Cargo.lock), since Velopack takes the package version from the tag while the binary reports the manifest version.
Lolle2000la
force-pushed
the
ci/release-automation
branch
from
October 11, 2026 23:28
37dd034 to
f15e11e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Releases are tag-driven, but the version bump commit and the signed tag were both hand-made — which is how
Cargo.tomldrifted to3.0.0-alpha.13while the newest tag wasv3.0.0-alpha.17. The binary reports the manifest version (About dialog, updater prerelease detection), so that drift is user-visible.This adds a single local entry point for cutting a release and a CI guard that makes drift impossible to ship.
scripts/release.shorigin, optional green-CI check for HEAD (gh+jqwhen present;--require-cimakes failures fatal).[workspace.package].version, refreshesCargo.lock(cargo update --workspace, verified withcargo metadata --locked), commitschore: bump version to X.commit.gpgsign/tag.gpgsign), so the prefacing release summary still works exactly as when tagging by hand.release.ymlunchanged.Cargo.toml/Cargo.lockback. Flags:--no-push,--no-verify,--dry-run,-h.The tag stays local/signed by the maintainer (no signing key in CI secrets), which is why the bump+commit+tag all happen in one local command rather than split across CI.
release.ymlguardNew
verify-versionjob (a dependency ofdeploy) that fails the whole run unless the tag name (minusv) matches bothCargo.toml's[workspace.package].versionandCargo.lock'smedia-sort-guientry — before anything is built or signed.Docs
Adds a
## Releasingsection toAGENTS.mddocumenting the tag→build→sign→publish flow, the two version consumers, and the script.Verification
bash -n+shellcheckclean;--help, and the guard paths (missing/invalid/current version, existing local tag) all fail as intended.--dry-runagainstv3.0leaves the tree untouched.3.0.0-alpha.13→3.0.0-alpha.18):cargo update --workspaceupdated the workspace members,cargo metadata --lockedpassed, andCargo.lockreported the new version (then restored).verify-versionlogic was run locally for a matching and a mismatching tag.release.ymlparses as valid YAML.