This guide is for maintainers cutting a tagged release. It is intentionally
short: the release itself is a single action — publishing a GitHub Release,
which pushes a vMAJOR.MINOR.PATCH tag — but two metadata files have to be
correct in the tagged commit first, so they are prepared and merged
before the release is published.
Pushing a vMAJOR.MINOR.PATCH tag (which happens when you publish a GitHub
Release) fans out to three workflows:
| Workflow | Effect |
|---|---|
release_pypi.yml |
Builds wheels and publishes cytnx X.Y.Z to PyPI |
conda_build_release.yml |
Builds and uploads the conda package |
docs.yml |
Publishes the Sphinx docs to gh-pages/X.Y.Z/ and updates the gh-pages/stable/ permalink |
Two of these read version metadata from the repository at the tagged commit, so that metadata must already be right when the tag is created:
- The package version comes from
version.cmake, not from the git tag. scikit-build-core stampsMAJOR.MINOR.PATCHfromversion.cmakeonto the PyPI/conda packages and ontocytnx.__version__. Ifversion.cmakesays1.1.0but you tagv1.2.0, PyPI publishes1.1.0. - The docs slug must match the published directory. The version switcher
and the documentation landing page build URLs as
<site_root>/<slug>/, taking<slug>from theversionfield ofdocs/site_root/versions.json.docs.ymldeploys release docs to a directory named after the tag with the leadingvstripped (v1.1.0→gh-pages/1.1.0/), so theversions.jsonslug must be the numeric1.1.0, neverv1.1.0. Av-prefixed slug links to a directory that does not exist and serves a 404.
-
Bump
version.cmaketo the newMAJOR.MINOR.PATCH. -
Add the docs slug to
docs/site_root/versions.json. Insert an entry whoseversion(the URL slug) andname(the switcher label) are both the numeric version with no leadingv:{ "name": "1.2.0", "version": "1.2.0" }Keep the
deventry. There is no separatestableentry to maintain: the switcher automatically labels the highest-numbered release(stable)and the documentation root redirects to it, so adding the new release entry is all that is needed. (gh-pages/stable/still exists as a permalink to the latest release docs, maintained bydocs.yml.) -
Open steps 1 and 2 as a release-prep pull request and merge it. The
Release metadata consistencyworkflow checks thatversion.cmakeandversions.jsonagree; if you forget step 1 or 2, or write av-prefixed slug, the PR check fails before the release goes out. Run the same check locally with:python3 tools/check_release_consistency.py
-
Draft and publish the GitHub Release. On GitHub: Releases → Draft a new release, create the tag
vMAJOR.MINOR.PATCHtargeting the merged release-prep commit onmaster, click Generate release notes, review, and publish. Publishing pushes the tag and starts the release workflows above.
Doing steps 1–2 in a merged PR first means the tagged commit already holds
the correct version.cmake and versions.json and the consistency check has
already passed — so publishing the release is the last action, not the first.
- Once the
docs.ymlrun finishes, confirmhttps://cytnx-dev.github.io/Cytnx/X.Y.Z/resolves and that the version switcher lists the new release, marked(stable). - Once
release_pypi.ymlfinishes, confirmpip install cytnx==X.Y.Zresolves.