Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Publish a new release to the Bazel Central Registry (BCR).
#
# Called by release.yml after a release is cut. Can also be run manually from
# the Actions UI ("Run workflow") against a release tag to retry a failed run.
name: Publish to BCR

on:
workflow_call:
inputs:
tag_name:
required: true
type: string
secrets:
BCR_PUBLISH_TOKEN:
required: true
workflow_dispatch: {}

jobs:
publish:
permissions:
contents: write
uses: bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml@v1.4.1
with:
tag_name: ${{ inputs.tag_name || github.ref_name }}
registry_fork: helly25/bazel-central-registry
# Personal-account PAT: open a draft PR so the author can click "Ready for
# review" to approve it (GitHub forbids reviewing your own PR).
draft: true
# Integrity is computed from the tarball URL in .bcr/source.template.json.
# (The release also produces SLSA attestations; flip attest:true +
# download_default_release_artifacts:true to have the BCR verify them.)
attest: false
download_default_release_artifacts: false
secrets:
publish_token: ${{ secrets.BCR_PUBLISH_TOKEN }}
14 changes: 14 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,17 @@ jobs:
with:
release_files: bzl-*.tar.gz
prerelease: true

# Mirror the release to the Bazel Central Registry (replaces the retired
# publish-to-bcr GitHub App). See .github/workflows/publish.yaml.
publish:
needs: release
# Grant what publish.yaml's job requests; a called workflow cannot exceed
# the caller's permissions.
permissions:
contents: write
uses: ./.github/workflows/publish.yaml
with:
tag_name: ${{ github.ref_name }}
secrets:
BCR_PUBLISH_TOKEN: ${{ secrets.BCR_PUBLISH_TOKEN }}
Loading