Releasing#
Maintainer runbook for cutting a mononet release to PyPI. Publishing uses
PyPI Trusted Publishing (OIDC) — no API tokens or stored secrets.
One-time setup (maintainer, web UI)#
Do this once before the first release.
GitHub Environments. In the repository settings, create two environments:
pypiandtestpypi.PyPI pending publisher — at https://pypi.org/manage/account/publishing/, add a pending publisher:
PyPI Project Name:
mononetOwner:
davorrunjeRepository name:
mononetWorkflow name:
publish.ymlEnvironment name:
pypi
TestPyPI pending publisher — repeat at https://test.pypi.org/manage/account/publishing/ with Environment name
testpypi.
If any of these values is wrong, the first upload fails at the OIDC exchange with a “not a trusted publisher” error.
Version bumping#
The version lives in pyproject.toml and is the single source of truth. Use
the Bump Version GitHub Action (Actions tab → Bump Version → Run workflow),
which runs uv version --bump <type> and opens a PR. Options:
Bump |
From |
Notes |
|---|---|---|
|
|
iterate the alpha |
|
|
|
|
|
|
|
|
promote prerelease to final |
|
|
|
|
|
|
|
|
alpha/beta/rc/stable only work standalone when the current version is
already a pre-release. From a stable version, bump a release component first
(patch/minor/major); a bare alpha bump from a stable version errors.
Per-release flow#
(If benchmarks changed) in a
gpu-*devcontainer, run./tools/execute-benchmarks.sh, sanity-checkgit diff docs/benchmarks/, and commit the regenerated notebooks.Run Bump Version with the desired bump type; merge the resulting PR into
main.(Optional rehearsal) Actions tab → Publish → Run workflow →
target: testpypi(which is the default). Verify the project page on https://test.pypi.org/project/mononet/ and a clean install:pip install -i https://test.pypi.org/simple/ mononet==<version>.Create a GitHub Release: tag
v<version>(e.g.v0.0.0a0), target the merge commit onmain, mark it pre-release for alphas/betas/rcs, and write release notes.Publishing the release fires the Publish workflow to real PyPI. It fails fast if the tag does not match the
pyproject.tomlversion. Thev*.*.*tag created by the release triggers the Docs workflow to deploy the versioned docs.
Notes#
Publishing does not re-run the test matrix; releases are expected to be cut from a
mainwhosebuild.ymlchecks are green.A real-PyPI upload cannot be replaced, only yanked. Use the TestPyPI rehearsal for first-of-its-kind releases.