To create and publish a new release of the package to PyPI:
-
Update the Version:
- Update the version in your
pyproject.tomlfile following semantic versioning, e.g.,0.0.1→0.1.0for a minor update.
- Update the version in your
-
Commit the Changes:
- Commit and push the version update to the main branch:
git add pyproject.toml git commit -m "Bump version to vX.Y.Z" git push origin main
- Commit and push the version update to the main branch:
-
Create a Tag:
- Tag the commit with the new version:
git tag vX.Y.Z git push origin vX.Y.Z
Replace
vX.Y.Zwith the actual version number. - Tag the commit with the new version:
-
GitHub Actions Workflow:
- When the tag is pushed, the
release.ymlGitHub Actions workflow will automatically:- Build the package using Poetry.
- Publish the package to PyPI.
- When the tag is pushed, the
-
Confirm the Release:
- Check PyPI to ensure the new version has been published successfully.