Venn

Publishing the Python package#

The distribution is venn-vdm; Python code imports venn. The package version is in pyproject.toml. Creating a GitHub release or pushing a tag does not upload anything to PyPI.

One-time PyPI setup#

  1. Sign into PyPI, verify your email and enable two-factor authentication.
  2. Open Publishing and add a pending GitHub Trusted Publisher for the new project:
Field Value
PyPI project venn-vdm
GitHub owner markrussinovich
Repository venn-vdm
Workflow filename publish.yml
Environment pypi

The pending publisher creates the PyPI project on its first successful upload. It does not require an initial manual upload or a long-lived PyPI API token.

Prepare privately#

Keep repository variable PUBLISH_PYPI=false. The manually dispatched Publish Python package workflow builds a selected version tag and checks its distributions with Twine. Its upload job runs only when the repository is public and PUBLISH_PYPI=true. Private preparation can therefore build and download the distributions without publishing them. The build also requires the latest push CI run for the exact release-tag revision to have completed successfully. A running, failed or missing run blocks publishing; wait for tag CI before dispatching this workflow.

Publish at launch#

After the public launch decision:

  1. Verify CI on the release commit, then tag it vX.Y.Z, matching the package version. Push the tag.
  2. Confirm the PyPI Trusted Publisher fields match the table above. Configure the GitHub pypi environment's release protection as appropriate.
  3. Set PUBLISH_PYPI=true and manually dispatch publish.yml with the version tag. Review the build and publishing jobs.
  4. Install venn-vdm from PyPI in a clean Python 3.12 environment and run venn quickstart. Turn PUBLISH_PYPI off again between releases if desired.

PyPI uploads are public. Use a new version for a replacement release; an already-used distribution filename cannot be uploaded again. See the packaging guide for manual upload instructions if Trusted Publishing is unavailable.

View this page on GitHub

On this page