- Modify the
./python/private/pypi/requirements.txt
file and run:bazel run //private:whl_library_requirements.update
- Run the following target to update
twine
dependencies:bazel run //private:requirements.update
- Bump the coverage dependencies using the script using:
bazel run //tools/private/update_deps:update_coverage_deps <VERSION> # for example: # bazel run //tools/private/update_deps:update_coverage_deps 7.6.1
Start from a clean checkout at main
.
Before running through the release it's good to run the build and the tests locally, and make sure CI is passing. You can also test-drive the commit in an existing Bazel workspace to sanity check functionality.
- Determine the next semantic version number
- Create a tag and push, e.g.
git tag 0.5.0 upstream/main && git push upstream --tags
NOTE: Pushing the tag will trigger release automation. - Watch the release automation run on https://github.com/bazelbuild/rules_python/actions
- Add missing information to the release notes. The automatic release note generation only includes commits associated with issues.
rules_python is currently using Zero-based versioning and thus backwards-incompatible API changes still come under the minor-version digit. So releases with API changes and new features bump the minor, and those with only bug fixes and other minor changes bump the patch digit.
To find if there were any features added or incompatible changes made, review
the commit history. This can be done using github by going to the url:
https://github.com/bazelbuild/rules_python/compare/<VERSION>...main
.
If a patch release from head would contain changes that aren't appropriate for a patch release, then the patch release needs to be based on the original release tag and the patch changes cherry-picked into it.
In this example, release 0.37.0
is being patched to create release 0.37.1
.
The fix being included is commit deadbeef
.
git checkout -b release/0.37 0.37.0
git push upstream release/0.37
git cherry-pick -x deadbeef
- Fix merge conflicts, if any.
git cherry-pick --continue
(if applicable)git push upstream
If multiple commits need to be applied, repeat the git cherry-pick
step for
each.
Once the release branch is in the desired state, use git tag
to tag it, as
done with a release from head. Release automation will do the rest.
- Announce the release in the #python channel in the Bazel slack (bazelbuild.slack.com).
Part of the release process uploads packages to PyPI as the user rules-python
.
This account is managed by Google; contact [email protected] if
something needs to be done with the PyPI account.