Releasing¶
PyPI is published only from a GitHub Release, never from a push or tag.
- Bump
__version__inpymetaheuristics/__init__.py(and the version assertion intests/test_pymetaheuristics.py) and updateCHANGELOG.md. - Merge to
main. - Create a GitHub Release with tag
v<version>(for examplev0.2.0). The tag must match__version__(a leadingvis ignored) or the workflow fails before building.
The delivery.yml workflow then verifies the tag, builds the sdist and
wheel, publishes to PyPI with trusted publishing (no secrets) and attaches
both files to the release. Pre-releases are skipped: nothing is published
or attached.
One-time setup (repository owner)¶
- On PyPI, register a trusted publisher for
pymetaheuristics: ownerigormcsouza, repositorypymetaheuristics, workflowdelivery.yml, environmentpypi. - In the GitHub repository settings, create the
pypienvironment. - For the docs site, enable GitHub Pages with source "GitHub Actions"
(Settings, Pages). The
docs.ymlworkflow deploys on pushes tomainand fails until this is done.