How to Release?

Creating a Release

  1. Set a variable named TAG with the appropriate version numbers:

    TAG="<major>.<minor>.<patch>"
    
  2. Prepare the project for a new release:

    nox -s release:prepare -- "${TAG}"
    
  3. Merge your Pull Request to the default branch

  4. Switch to the default branch:

    git checkout $(git remote show origin | sed -n '/HEAD branch/s/.*: //p')
    
  5. Update branch:

    git pull
    
  6. Create a new tag in your local repo:

    git tag "${TAG}"
    
  7. Push the repo to remote:

    git push origin "${TAG}"
    

    Hint

    GitHub workflow .github/workflows/cd.yml reacts on this tag and starts the release process

What to do if the release failed?

The release failed during pre-release checks

  1. Delete the local tag

    git tag -d "${TAG}"
    
  2. Delete the remote tag

    git push --delete origin "${TAG}"
    
  3. Fix the issue(s) which lead to the failing checks

  4. Start the release process from the beginning

One of the release steps failed (Partial Release)

  1. Check the Github action/workflow to see which steps failed

  2. Finish or redo the failed release steps manually

Note

Example

Scenario: Publishing of the release on Github was successfully but during the PyPi release, the upload step got interrupted.

Solution: Manually push the package to PyPi