Releases are created from semantic-version tags such as v0.1.0. The release
workflow creates an attested source archive, opens a Bazel Central Registry
(BCR) pull request, and publishes the draft GitHub release after the BCR publish
job succeeds.
- Choose and add the repository license before the first public release.
- Keep the
stackb/bazel-central-registryfork synchronized withbazelbuild/bazel-central-registry. - Add an Actions secret named
BCR_PUBLISH_TOKEN. Use a classic personal access token belonging to the account that can push to the fork and open a pull request against the upstream BCR. It needsrepoandworkflowscopes. - Review
.bcr/metadata.template.json, especially the maintainer email, before the first publication.
-
Ensure CI is green and the checkout is clean.
-
Confirm the release notes and public API are ready.
-
Create and push the tag:
git tag -a v0.1.0 -m "v0.1.0" git push origin v0.1.0
The tag starts .github/workflows/release.yml. If BCR publication needs to be
retried without recreating the GitHub release, run the Publish to BCR
workflow manually and supply the existing tag.
If the source-archive attestation itself must be regenerated, run the full
Release workflow with the existing tag instead. The publish-only workflow
regenerates source.json and MODULE.bazel attestations, but not the release
archive attestation.
The BCR pull request is intentionally opened as a draft. The token owner must mark it ready for review, which serves as the maintainer approval recognized by the BCR.
The two attestation-producing reusable workflows are referenced by release tag,
not commit SHA. BCR's SLSA verifier requires the builder attestation to contain
a refs/tags/... workflow ref and rejects a bare SHA as an unknown ref type.
Other third-party Actions remain pinned by commit SHA.
The release preparation step rejects malformed tags and refuses to publish
until a LICENSE, LICENSE.txt, or LICENSE.md file exists.