Release workflow¶
Fill the
CHANGELOG.mdwith the new version. You can write it manually or use the auto-generated release notes by Github:Go to project’s releases and click on
Draft a new releaseIn
Choose a tag, enter the new tag (obviously complying with SemVer)Click on
Generate release notesCopy/paste the generated text from
## What's changeduntil the line before**Full changelog**:...in the CHANGELOG.md replacingWhat's changedwith the tag and the publication dateClose this tab.
Warning
DO NOT CREATE/PUBLISH THE RELASE THROUGH WEB INTERFACE: due to the Immutable Release policy, the publishing workflow won’t be unable to push assets to the release and it won’t be possible to edit it anymore. The only option would be to create a new tag, as we already experienced it with the 0.41.
01.Commit changes with a message like
release: bump version to X.x.xto the main branchApply a git tag with the relevant version:
git tag -a 0.3.0 {git commit hash} -m "New awesome feature"Push commit and tag to main branch:
git push --tags
If things go wrong (failed CI/CD pipeline, missed step…), here comes the fix process:
git tag -d old
git push origin :refs/tags/old
git push --tags
And try again!
Manual upload to PyPi¶
This method requires an API token on PyPi
If the CI/CD fails for any reason, here comes the manual procedure:
Install required packages:
python -m pip install -U build setuptools-scm twine wheel
Install package in editable mode:
python -m pip install -e .
Clean previous builds and build package artifacts:
rm -rf dist/ python -m build --no-isolation --sdist --wheel --outdir dist/ .
Upload built artifacts to PyPi:
twine upload -u __token__ dist/*