Repository navigation
Release a version bump when it merges, and add a Prepare release workflow - #214
Merged
Merged
Conversation
…ase workflow that opens the bump PR. A push to main that changes pyproject.toml now runs release.yml, which releases the version when its tag doesn't exist yet and it is greater than the newest vX.Y.Z tag by semver, and tags the merge commit with the GitHub release. A pushed tag still releases, as the fallback. Prepare release bumps pyproject.toml and uv.lock on release/vX.Y.Z and opens "Release vX.Y.Z". scripts/release_version.py does the semver arithmetic both use. Follow-up to #158.
…e a stale uv.lock, and word errors as drivine does
…fuse an exact version equal to the current one
…ncel a waiting release
Merged
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.
Follow-up to #158. Releases now happen on merge, and a "Prepare release" button opens the bump PR. The same change is going into drivine4j, drivine and drivine-python, and the new controller repo, liberation-data/drivine-release, can drive all three as a dated release train.
A release, end to end (
RELEASING.md):patch,minor,majororprerelease, or give an exact version. The workflow bumpspyproject.toml(anduv.lock), commits onrelease/v<version>and opens a PR titled "Release v". The PR lists the commits since the last release.release.ymlreleases it. CI runs as the gate, then build, publish (in thereleaseenvironment) andgithub-release, which creates thev<version>tag and the GitHub Release on the merged commit.vX.Y.Ztag by hand still releases it, as a fallback.release.yml: the branch-push path.checkreads the version and publishes only whenv<version>isn't tagged yet and the version is later than the newest release tag, by semver precedence. Otherwise:pyproject.toml(anduv.lock) without a new version, or that reverts to a lower one, runs onlycheck, and its notice says why. Nothing is built or published.X.Y.Z(-suffix)fails the run.Dry runs get their own concurrency group. A dry run queued behind a release could otherwise cancel a release that was waiting.
prepare-release.ymlworkflow_dispatch, and alsoworkflow_callfor the train controller.X.Y.Z(-suffix)before any tool reads it. It must be later than the newest tag, not tagged, not the current version, and have no existingrelease/v…branch.npm version --preid rcdoes.RELEASE_PR_TOKENif set, elseGITHUB_TOKEN. WithGITHUB_TOKEN, CI doesn't start on the PR by itself (a GitHub rule); the run's notice and the PR say how to start it.RELEASE_PR_TOKENfails at the first step.drivine-python specifics:
scripts/release_version.py(standard library only, tested intests/unit/test_release_version.py) does the semver ordering and bumps. It sets[project].versionand checks it withtomllibbefore saving. Prepare release first refuses auv.lockthat is not up to date (uv lock --check), so the PR changes only the version.Settings for the maintainer
releaseenvironment: add required reviewers, the human checkpoint now that merging publishes. If its deployment rules are limited, allow the branchmainas well as the tagsv*.RELEASE_PR_TOKENsecret: a fine-grained token with Contents and Pull requests read/write, so CI runs on the release PR.Review. Four review passes. Among the bugs fixed:
npm/uvbefore it was checked;Checked locally in a sandbox, with stub
ghandgit push: thecheckcases (bump, no bump, lower, existing tag, rc ordering, tag push match and mismatch, dispatch, PR), the bump cases, and the version arithmetic against npm's semver. The real merge release, tag creation and PR opening can only be tested on GitHub.