Authoring a module
Modules are published to the registry with the rels tool (in
tomato-bazel/bazel-registry),
which cuts a version from a GitHub tag.
Cut a release
-
Tag the module repo at the release commit — the tag is
v<version>(matching theversionin itsMODULE.bazel):git tag v0.1.0 && git push origin v0.1.0The repo (and thus the tag tarball) must be public — a registry module’s source has to be anonymously fetchable, or keyless CI can’t resolve it.
-
From a
bazel-registrycheckout, cut the version —relsfetches the tag tarball, computes the integrity, and writesmodules/<name>/<version>/{source.json, MODULE.bazel}+ upsertsmetadata.json:bazel run //tools/rels:rels -- release \ --repo tomato-bazel/<repo> --version 0.1.0 --name <module_name> -
Commit + push.
registry.tbzl.devserves the new version within about a minute.
Conventions
- Module
nameis the bzlmod module name (snake_case), which may differ from the repo basename — pass--namewhen it does. rels auditflags tag↔registry drift, missing CI/CHANGELOG, and dep-pin drift.