From 62f15ba253715745d8a65b9824e1a0f52b82263e Mon Sep 17 00:00:00 2001 From: Derek Cormier Date: Fri, 12 Dec 2025 16:12:29 -0800 Subject: [PATCH 1/2] chore: use publish to bcr reusable workflow for bcr mirroring --- .bcr/config.yml | 3 --- .github/workflows/publish.yaml | 42 ++++++++++++++++++++++++++++++++++ .github/workflows/release.yaml | 7 ++++++ 3 files changed, 49 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/publish.yaml diff --git a/.bcr/config.yml b/.bcr/config.yml index 8857042d92..e8c0b3886a 100644 --- a/.bcr/config.yml +++ b/.bcr/config.yml @@ -1,6 +1,3 @@ -fixedReleaser: - login: scentini - email: 11149636+scentini@users.noreply.github.com moduleRoots: - "." - "extensions/bindgen" diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000000..6e025887b7 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,42 @@ +# See https://github.com/bazel-contrib/publish-to-bcr +name: Publish to BCR + +on: + # Allow the publish workflow to be called from another workflow. + # In this case, we trigger it from the release.yaml workflow. + workflow_call: + inputs: + release_version: + required: true + type: string + secrets: + BCR_PUBLISH_TOKEN: + required: true + # In case of problems, let release engineers retry by manually dispatching + # the workflow from the GitHub UI. + workflow_dispatch: + inputs: + release_version: + required: true + type: string + description: Release version to publish to the Bazel Central Registry + templates_ref: + default: '' + type: string + description: Override the ref to read .bcr templates from +jobs: + publish: + uses: bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml@v1.1.0 + with: + attest: false + draft: false + tag_name: ${{ inputs.release_version }} + # Tags don't include a "v" prefix + tag_prefix: "" + # GitHub repository which is a fork of the upstream where the Pull Request will be opened. + registry_fork: bazel-io/bazel-central-registry + templates_ref: ${{ inputs.templates_ref || inputs.release_version }} + permissions: + contents: write + secrets: + publish_token: ${{ secrets.publish_token || secrets.BCR_PUBLISH_TOKEN }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 49ae6751b2..9c2865498f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -315,3 +315,10 @@ jobs: asset_name: cargo-bazel-aarch64-unknown-linux-musl asset_path: ${{ github.workspace }}/artifacts/aarch64-unknown-linux-musl/cargo-bazel asset_content_type: application/octet-stream + publish: + needs: [archive, release] + uses: ./.github/workflows/publish.yaml + with: + release_version: ${{ needs.archive.outputs.release_version }} + secrets: + BCR_PUBLISH_TOKEN: ${{ secrets.BCR_PUBLISH_TOKEN }} From f4c4d56aa9f0d37aec83572c4a40642547a3c459 Mon Sep 17 00:00:00 2001 From: Derek Cormier Date: Fri, 6 Mar 2026 09:24:54 -0800 Subject: [PATCH 2/2] Update .github/workflows/publish.yaml Co-authored-by: UebelAndre --- .github/workflows/publish.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 6e025887b7..f76bbb103f 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -28,6 +28,8 @@ jobs: publish: uses: bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml@v1.1.0 with: + author_name: bazel-io + author_email: 5028808+bazel-io@users.noreply.github.com attest: false draft: false tag_name: ${{ inputs.release_version }}