Skip to content

Releasing

ezexey edited this page Nov 19, 2026 · 1 revision

Releasing

The release workflow tags and releases a push to main whose version in lbiza/pyproject.toml has no tag yet. A push that leaves the version as it is releases nothing.

What a release holds

  • Each release holds the sdist and the wheel built from lbiza/, under the tag v<version>.
  • Each release also pushes an image with the wheel installed on torch's CPU-only wheels, as ghcr.io/ezexe/phi:<version> and ghcr.io/ezexe/phi:latest, built by lbiza/Dockerfile, whose entry point is the phi-prune command.

Cut a release

Raise version in three places, which lbiza/tests/test_packaging.py holds equal, and push to main:

  • lbiza/pyproject.toml
  • lbiza/phi_prune/__init__.py
  • CITATION.cff

What the workflow does, in order

  1. It reads the version of lbiza/pyproject.toml and looks for the tag v<version>, and nothing more runs when the tag exists.
  2. It runs the tests workflow.
  3. It builds the sdist and the wheel from lbiza/.
  4. It builds the image from the wheel, runs it once and pushes it to ghcr.io/ezexe/phi.
  5. It tags the commit and makes the GitHub release that holds both files.

The image is pushed before the tag is made, so a release whose image fails to build or to run leaves no tag behind.

PyPI

The workflow's pypi job uploads the same two files to PyPI as the project phi-prune, by trusted publishing, with no token kept in the repository. It runs once the repository variable PYPI_PUBLISH is true. It needs a trusted publisher on PyPI for the project phi-prune that names the owner ezexe, the repository phi, the workflow release.yml and the environment pypi.

Clone this wiki locally