Add the publish-to-bcr workflow, .bazelci config#370
Open
mbland wants to merge 2 commits intobazelbuild:mainfrom
Open
Add the publish-to-bcr workflow, .bazelci config#370mbland wants to merge 2 commits intobazelbuild:mainfrom
mbland wants to merge 2 commits intobazelbuild:mainfrom
Conversation
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>
Author
|
cc: @bergsieker |
Closed
Author
|
cc: @meteorcloudy |
.bcr/metadata.template.json
Outdated
| "homepage": "https://github.com/bazelbuild/remote-apis", | ||
| "maintainers": [ | ||
| { | ||
| "name": "Xudong Yang", |
Member
Author
Per @meteorcloudy's suggestion below. Replaces @Wyverald, as well as @bergsieker, who I understand isn't at Google anymore. - bazelbuild#370 (comment)
Yannic
reviewed
Mar 20, 2026
| @@ -0,0 +1,15 @@ | |||
| { | |||
| "homepage": "https://github.com/bazelbuild/remote-apis", | |||
| "maintainers": [ | |||
Contributor
Author
Yannic
reviewed
Mar 20, 2026
| id-token: write | ||
| secrets: | ||
| # Necessary to push to the BCR fork and open a pull request. | ||
| publish_token: ${{ secrets.bcr_publish_token }} |
Contributor
There was a problem hiding this comment.
How is this secret defined?
Author
There was a problem hiding this comment.
It should be an existing org-level secret, given existing use by: https://github.com/bazelbuild/rules_java/blob/9.6.1/.github/workflows/publish.yaml#L30-L32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/bcrBazel module for the.bcr/presubmit.ymltests, 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 asoft_fail).Adds
release.ymlandrelease_prep.shto.github/workflowsas well, which are prerequisites for thepublish-to-bcr.ymlworkflow.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 withrolling(10.0.0-pre.20260223.3) andlast_green(bazelbuild/bazel@6a70e55) Bazels. Neither have--incompatible_autoload_externallyany longer, and the unreleasedgrpcv1.80.0 contains the fix.Fixes #369.
Closes #313.