Skip to content

Add the publish-to-bcr workflow, .bazelci config#370

Merged
fmeum merged 3 commits intobazelbuild:mainfrom
mbland:mbland-publish-to-bcr
Mar 31, 2026
Merged

Add the publish-to-bcr workflow, .bazelci config#370
fmeum merged 3 commits intobazelbuild:mainfrom
mbland:mbland-publish-to-bcr

Conversation

@mbland
Copy link
Copy Markdown
Contributor

@mbland mbland commented Mar 13, 2026

Continues @Wyverald's work from #313 to prepare for publishing to the Bazel Central Registry. Adapted some of the new workflows from bazel-contrib/rules_scala v7.2.4.

  • Adjusted some of the dependency versions in MODULE.bazel to be as low as possible, compatible with Bazel 7.x, and high enough to avoid warnings.

  • Adds the test/bcr Bazel module for the .bcr/presubmit.yml tests, to test building targets referenced from a client repo.

  • Adds a .bazelci/presubmit.yml, which also mirrors the jobs from .bcr/presubmit.yml (but with a soft_fail).

  • Adds release.yml and release_prep.sh to .github/workflows as well, which are prerequisites for the publish-to-bcr.yml workflow.

  • Updates several generated Go files after running hooks/pre-commit.

The module builds with Bazel 7.x, 8.x, and 9.x (8.x and 9.x require --incompatible_autoload_externally, as noted in .bazelrc). It will not currently build with rolling (10.0.0-pre.20260223.3) and last_green (bazelbuild/bazel@6a70e55) Bazels. Neither have --incompatible_autoload_externally any longer, and the unreleased grpc v1.80.0 contains the fix.

Fixes #369.

Closes #313.

Continue's @Wyverald's work from bazelbuild#313 to prepare for publishing to the
Bazel Central Registry. Adapted some of the new workflows from
bazel-contrib/rules_scala v7.2.4.

- Adjusted some of the dependency versions in MODULE.bazel to be as low
  as possible, compatible with Bazel 7.x, and high enough to avoid
  warnings.

- Adds the `test/bcr` Bazel module for the `.bcr/presubmit.yml` tests,
  to test building targets referenced from a client repo.

- Adds a `.bazelci/presubmit.yml`, which also mirrors the jobs from
  `.bcr/presubmit.yml` (but with a `soft_fail`).

- Adds `release.yml` and `release_prep.sh` to `.github/workflows` as
  well, which are prerequisites for the `publish-to-bcr.yml` workflow.

- Updates several generated Go files after running `hooks/pre-commit`.

The module builds with Bazel 7.x, 8.x, and 9.x (8.x and 9.x require
`--incompatible_autoload_externally`, as noted in `.bazelrc`). It will
_not_ currently build with `rolling` (10.0.0-pre.20260223.3) and
`last_green` (bazelbuild/bazel@6a70e55)
Bazels. Neither have `--incompatible_autoload_externally` any longer,
and the unreleased `grpc` v1.80.0 contains the fix.

Fixes bazelbuild#369.

Closes bazelbuild#313.

Co-authored-by: Xùdōng Yáng <wyverald@gmail.com>
@mbland
Copy link
Copy Markdown
Contributor Author

mbland commented Mar 13, 2026

cc: @bergsieker

@mbland mbland mentioned this pull request Mar 13, 2026
@mbland
Copy link
Copy Markdown
Contributor Author

mbland commented Mar 17, 2026

cc: @meteorcloudy

Comment thread .bcr/metadata.template.json Outdated
Per @meteorcloudy's suggestion below. Replaces @Wyverald, as well as
@bergsieker, who I understand isn't at Google anymore.

- bazelbuild#370 (comment)
Comment thread .bcr/metadata.template.json
Comment thread .github/workflows/publish-to-bcr.yml
@fmeum fmeum merged commit becdd8f into bazelbuild:main Mar 31, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Publishing to the Bazel Central Registry

5 participants