Publishing To PyPI¶
The Python package is published as:
- package name:
forestfire-ml - import name:
forestfire
Local release flow¶
Build and validate:
task python-package-check
Upload to TestPyPI:
task python-package-publish-testpypi
Upload to PyPI:
task python-package-publish
Automated publishing¶
This repository includes GitHub Actions trusted publishing for PyPI in:
.github/workflows/publish-python.yaml
That workflow runs after every push to main, including merged pull requests.
It calculates the next patch version from the existing v* release tags, builds
wheels and an sdist with that version, publishes them through PyPI trusted
publishing, then tags the released commit as vX.Y.Z.
If a workflow is re-run for a commit that already has a vX.Y.Z tag, the
publish job is skipped so the same commit is not released twice.
The docs site is deployed separately through .github/workflows/docs.yaml to GitHub Pages.
Before releasing¶
Make sure you:
- bump the version in the workspace
pyproject.toml - bump the version in
bindings/python/pyproject.toml - bump the version in
bindings/python/Cargo.toml - verify the mixed package metadata still includes:
module-name = "forestfire._core"python-source = "python"python/forestfire/_core.pyipython/forestfire/py.typed- verify the PyPI project name is correct
- confirm that the
forestfire-mlproject name is the intended PyPI target - run the package check task before tagging
- ensure the GitHub trusted publisher is configured for the correct project name
- ensure the workflow has
contents: writepermission so it can create tags
Local tasks¶
task python-package-buildtask python-package-checktask python-package-publish-testpypitask python-package-publish