From: Tomás Rivera, platform team, Fernhill Garden Supply
"We publish fernhill-sync and two other internal packages by hand, and twice this quarter we shipped a broken release: once a breaking change as a minor version, once a version number that already existed. I'd like a check that runs in CI before every publish.
It gets pyproject.toml as text, the last released version, the commit subjects since then and our existing tags. It should report one line per check and finish with a yes or no, so CI can stop the publish and a person can see why."
Done looks like: a function that returns the project line, the version, bump, dependency and tag checks, and a final release decision.
A release that goes wrong is expensive: a version that already exists, a breaking change shipped as a minor update, a dependency range that lets next year's major version in, or a tag that points at two commits. Teams put a release check in CI to catch these before anything is published.
You will build that check in six steps, keeping your own code from one step to the next. Each step adds one line to the report the function returns, and every helper you write stays in use. The inputs are the text of pyproject.toml, the previous release, the commit subjects since then and the existing tags, all in one JSON payload.
The final line is the decision CI acts on. The lines above it tell a person what to fix.
Out: 1. Every check line either ends in ": ok" or names a problem.