-
-
Notifications
You must be signed in to change notification settings - Fork 286
Use the Publish to BCR reusable GitHub workflow #1731
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
Updates `.github/workflows/release.yml` and adds `publish-to-bcr.yml` for publishing to the Bazel Central Registry. Part of bazel-contrib#1482 (originally broken out from bazel-contrib#1722). `release.yml` now uses the `release_ruleset` workflow from `bazel-contrib/.github`, which does everything `release.yml` did previously and adds SLSA provenance attestations. `release.yml` then invokes the new `publish-to-bcr.yml` workflow after publishing a successful release to GitHub. Requires that the `BCR_PUBLISH_TOKEN` GitHub secret and the `registry_fork` specified in `.github/workflows/publish-to-bcr.yml` are in place. See `.bcr/README.md` for all the details and references. --- This will enable automated publishing to https://registry.bazel.build/.
@simuons @liucijus I believe if you're OK with the transfer to the bazel-contrib org, per #1616, then we can apply this change first before merging (@meteorcloudy please check me on this): diff --git i/.github/workflows/publish-to-bcr.yml w/.github/workflows/publish-to-bcr.yml
index 8f51b975..b5ebd076 100644
--- i/.github/workflows/publish-to-bcr.yml
+++ w/.github/workflows/publish-to-bcr.yml
@@ -28,7 +28,7 @@ jobs:
with:
tag_name: ${{ inputs.tag_name }}
# bazelbuild/bazel-central-registry fork used to open a pull request.
- registry_fork: simuons/bazel-central-registry
+ registry_fork: bazel-contrib/bazel-central-registry
permissions:
attestations: write
contents: write Also, it's essential that #1730 lands before we actually publish to the BCR. |
Suggested by @kormide in bazel-contrib#1731.
Recommended by @kormide based on my question in bazel-contrib#1731.
@meteorcloudy confirmed the transfer of the repo to the bazel-contrib org in bazel-contrib#1616. Transfering ownership before publishing the release will streamline publishing to the Bazel Central Registry by avoiding the need for a personal bazel-central-registry fork.
@simuons @liucijus I set the That just leaves creating the |
BTW, I just noticed another a bunch of similar errors in the CI build to the one I noted in 900847b earlier today: WARNING: Download from
https://github.com/bufbuild/buf/releases/download/v1.27.0/protoc-gen-buf-lint-Windows-x86_64.exe
failed: class java.io.IOException GET returned 618 jwt:jwt-not-provided Interesting that it looks like some invented a HTTP 618 error code somewhere. |
Suggested by @kormide in bazel-contrib#1731.
Recommended by @kormide based on my question in bazel-contrib#1731.
I think the github infra is a bit unstable recently, I'm also seeing similar issue in bazel builds. |
Note, I've populated a PAT for @aspect-marvin in the BCR_PUBLISH_TOKEN secret for this repo. |
Oh, I was expecting @simuons or @liucijus to approve and merge this...I hope they don't mind in this case. So to overstate the obvious to make absolutely sure I'm understanding correctly:
So @alexeagle: If they choose to replace And to be clear, I'd recommend against pushing a new tag to publish a new release until #1730 has landed. |
with: | ||
tag_name: ${{ inputs.tag_name }} | ||
# bazelbuild/bazel-central-registry fork used to open a pull request. | ||
registry_fork: bazel-contrib/bazel-central-registry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you are using @aspect-marvin as the PR author, I suggest setting draft: false
(it defaults to true). Removes one step you have to do to merge the PR.
The draft option was added because authors can't approve their own PRs on the BCR. The BCR team wants to use clicking the "Ready for review" button as a mechanism to approve the PR in those cases.
Description
Updates
.github/workflows/release.yml
and addspublish-to-bcr.yml
for publishing to the Bazel Central Registry. Part of #1482 (originally broken out from #1722).release.yml
now uses therelease_ruleset
workflow frombazel-contrib/.github
, which does everythingrelease.yml
did previously and adds SLSA provenance attestations.release.yml
then invokes the newpublish-to-bcr.yml
workflow after publishing a successful release to GitHub.Requires that the
BCR_PUBLISH_TOKEN
GitHub secret and theregistry_fork
specified in.github/workflows/publish-to-bcr.yml
are in place.See
.bcr/README.md
for all the details and references.Motivation
This will enable automated publishing to https://registry.bazel.build/.