|
| 1 | +# Releasing |
| 2 | + |
| 3 | +Releases are created from semantic-version tags such as `v0.1.0`. The release |
| 4 | +workflow creates an attested source archive, opens a Bazel Central Registry |
| 5 | +(BCR) pull request, and publishes the draft GitHub release after the BCR publish |
| 6 | +job succeeds. |
| 7 | + |
| 8 | +## One-time setup |
| 9 | + |
| 10 | +1. Choose and add the repository license before the first public release. |
| 11 | +2. Keep the `stackb/bazel-central-registry` fork synchronized with |
| 12 | + `bazelbuild/bazel-central-registry`. |
| 13 | +3. Add an Actions secret named `BCR_PUBLISH_TOKEN`. Use a classic personal |
| 14 | + access token belonging to the account that can push to the fork and open a |
| 15 | + pull request against the upstream BCR. It needs `repo` and `workflow` scopes. |
| 16 | +4. Review `.bcr/metadata.template.json`, especially the maintainer email, before |
| 17 | + the first publication. |
| 18 | + |
| 19 | +## Cut a release |
| 20 | + |
| 21 | +1. Ensure CI is green and the checkout is clean. |
| 22 | +2. Confirm the release notes and public API are ready. |
| 23 | +3. Create and push the tag: |
| 24 | + |
| 25 | + ```sh |
| 26 | + git tag -a v0.1.0 -m "v0.1.0" |
| 27 | + git push origin v0.1.0 |
| 28 | + ``` |
| 29 | + |
| 30 | +The tag starts `.github/workflows/release.yml`. If BCR publication needs to be |
| 31 | +retried without recreating the GitHub release, run the **Publish to BCR** |
| 32 | +workflow manually and supply the existing tag. |
| 33 | + |
| 34 | +The BCR pull request is intentionally opened as a draft. The token owner must |
| 35 | +mark it ready for review, which serves as the maintainer approval recognized by |
| 36 | +the BCR. |
| 37 | + |
| 38 | +The release preparation step rejects malformed tags and refuses to publish |
| 39 | +until a `LICENSE`, `LICENSE.txt`, or `LICENSE.md` file exists. |
0 commit comments