Skip to content

ci: release the version the code declares, and bump to 0.10.0 - #40

Merged
PricingFrontier merged 2 commits into
mainfrom
ci/release-version-from-code
Nov 8, 2026
Merged

PricingFrontier merged 2 commits into
mainfrom
ci/release-version-from-code

Conversation

@PricingFrontier

Copy link
Copy Markdown
Owner

Summary

Release now publishes the version the code declares, the same way Haute does. It used to ask for a version in a form, then bump it and commit to main itself.

  • Version comes from a PR. The workflow takes no version input and never edits or commits to the repository.
  • Refusals. It refuses a version PyPI already has, one not newer than the latest there, one already tagged, and a commit where main's CI hasn't passed. Publishing runs from main only.
  • Order of work. Build, check the files carry the version, smoke-test the wheel and sdist, publish, confirm PyPI serves exactly those files, then tag and create the GitHub Release. "Re-run failed jobs" completes a partial upload, because the upload skips files already there.
  • Permissions. The workflow's default drops to contents: read; only the tagging job can write.
  • CI guard. The version lives in pyproject.toml and both crates' Cargo.toml. scripts/check_release_version.py now runs on every PR and fails if they disagree.
  • Bumps to 0.10.0, since the workflow no longer does. The changelog section came in with fix: prepare the 0.10.0 release #39.

Two differences from Haute: the three version files above, and dry runs are allowed on any branch, which is the only way to test a change to this workflow before merging it.

Releasing from now on

  1. In a PR, run uv version --bump minor --no-sync (or patch/major), set the same version in crates/rustystats/Cargo.toml and crates/rustystats-core/Cargo.toml, and add the version's section to CHANGELOG.md.
  2. Merge it and wait for main's CI to pass.
  3. Actions → Release → Run workflow, on main.

Verification

  • actionlint and ruff 0.15.14 pass; 20 new tests cover both release scripts.
  • Against real PyPI, the check accepts 0.10.0 and refuses main's 0.9.0.
  • The workflow's shell steps ran against the real files from the last dry run, including their failure cases: wrong version in the file names, wrong installed version, an existing tag.
  • A dry run of this workflow from this branch follows this PR. The publish, PyPI check and tag steps can only run for real on the first release.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FsfCCsg5iwEbDuxnFqiQoB

PricingFrontier and others added 2 commits November 8, 2026 14:19
Release asked for a version, then bumped and committed to main itself. It now reads the version from the code and never edits the repository. It refuses a version already on PyPI or tagged and a commit whose CI has not passed, smoke-tests the built files, and tags only once PyPI serves exactly those files. CI fails any PR whose three version files disagree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FsfCCsg5iwEbDuxnFqiQoB
The Release workflow no longer sets the version, so it is set here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FsfCCsg5iwEbDuxnFqiQoB
@PricingFrontier
PricingFrontier merged commit 32b7c4c into main Nov 8, 2026
29 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