Thanks for contributing!
python -m venv .venv
source .venv/bin/activate
python -m pip install -U pip
pip install -e .python -m pip install -U build twine
python -m build
python -m twine check dist/*This repo is set up to publish to PyPI when you push a git tag matching v* (e.g. v1.0.1).
-
Bump
project.versioninpyproject.toml -
Commit and push to
main -
Tag and push:
git tag v1.0.1 git push origin v1.0.1
The Publish to PyPI workflow will build and publish.
Push a tag test-v1.0.1 (or trigger the workflow manually) to publish to TestPyPI first.
You can bump versions in two ways:
pip install -U bump2version
bump2version patch # or minor / major
git push --follow-tagsUse the Bump version and tag workflow with:
target=pypifor avX.Y.Ztag (publishes to PyPI)target=testpypifor atest-vX.Y.Ztag (publishes to TestPyPI)
If you want every push to main/master to publish and then bump the version, use:
.github/workflows/release-on-main.yml
This workflow:
- tags
vX.Y.Zif the tag doesn't exist, - publishes to PyPI,
- then bumps patch and pushes a commit with
[skip release].
You can disable this behavior by removing that workflow file or adding [skip release] to a commit message.