Creating a Release¶
Preparing a Release¶
Prepare the project for a new release
nox -s release:prepare -- --type {major,minor,patch}The
release:preparenox session affects thepyproject.toml,version.py, and files in thedoc/changesdirectory:Creates & switches to a release branch (can be skipped with
--no-branch)Updates the version in the
pyproject.tomlandversion.pyMoves the content of unreleased changes file
unreleased.mdto a versioned changes filechanges_<version>.mdDescribes additional changes in the versioned changes file by comparing file
poetry.lockto the latest Git tag:Resolved vulnerabilities based on Pip Audit.
Updated direct dependencies, excluding transitive dependencies
Updates file
changelog.mdto list the newly created versioned changes fileCommits the changes (can be skipped with
--no-add)Pushes the changes and creates a PR (can be skipped with
--no-pr)
Merge your Pull Request to the default branch
Trigger the release
nox -s release:triggerUse the nox session
release:triggerto:Switch to & pull the changes from the default branch
Verify that the version to be released does not already have a git tag or GitHub release
Create a new tag & push it to the default branch, which will trigger the GitHub workflow
cd.yml
Additionally, if enabled in your project config, the task will create an additional tag with pattern
v<MAJOR_VERSION>. This is especially useful if other projects use Github actions of your project, for example:uses: exasol/your_project/.github/actions/your_action@v1Your
PROJECT_CONFIGneeds to have the flagcreate_major_version_tags=True.
Updating The Versioned Changes File¶
If you need to update some dependencies after running the nox session
release:prepare you can update the versioned changes file by running the
nox session release:update.
What to do if the Release Failed?¶
The Release Failed During Pre-Release Checks¶
Delete the local tag
git tag -d "<major>.<minor>.<patch>""Delete the remote tag
git push --delete origin "<major>.<minor>.<patch>"Fix the issue(s) which led to the failing checks
Start the release process from the beginning
One of the Release Steps Failed (Partial Release)¶
Check the GitHub action/workflow to see which steps failed
Finish or redo the failed release steps manually
Note
Example
Scenario: Publishing of the release on GitHub was successful but during the PyPi release, the upload step was interrupted.
Solution: Manually push the package to PyPi