The Bazel Central Registry needs versioned snapshots and cannot consume git revisions directly. To cut a release, do the following:
Pick a new version. The current scheme is 0.YYYYMMDD.0
. If we need to cut multiple releases in one day, increment the third digit.
Update MODULE.bazel
with the new version and upload to Gerrit.
Once that CL lands, make a annotated git tag at the revision. This can be done from Gerrit. The “Annotation” field must be non-empty. (Just using the name of the tag again is fine.)
Create a corresponding GitHub release.
Download the “Source code (tar.gz)” archive from the new release and re-attach it to the release. (The next step will check that the archive is correct.)
Run go run ./util/prepare_bcr_module TAG
and follow the instructions. The tool does not require special privileges, though it does fetch URLs from GitHub and read the local checkout. It outputs a JSON file for BCR's tooling to consume.