Add nox session for creating release commits #7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a new nox session,
make_release
, which takes a version number as an argument, updates the changelog, and pushes a release branch and tag for that version based on the current commit. All of the interactions with git are automated, but creating a PR to merge the release branch back to main requires a manual step for now, as AFAIK there's not a nice way to do it without also requiring GitHub credentials.There are a few sanity checks in place to make sure this release process doesn't do anything bad:
origin
and checks that the release tag/branch being created doesn't already exist. There is technically a narrow window where two people could make the same release simultaneously, but GitHub should reject the second push anyway.main
; prerelease versions skip this check at present, as we could potentially want to make dev releases on side branches. If we in future want to enable making releases from stable branches (to patch old versions), that should be straightforward to exclude from this check as well.We don't yet have a pipeline in place for automatically making a release when a tag is pushed, but this is a step towards mostly-automated releases.