Skip to content

feat: add support for automated BCR publication #1

feat: add support for automated BCR publication

feat: add support for automated BCR publication #1

Workflow file for this run

name: Publish to Bazel Central Registry

Check failure on line 1 in .github/workflows/publish-to-bcr.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/publish-to-bcr.yml

Invalid workflow file

(Line: 39, Col: 9): Unexpected value 'secrets'
on:
release:
types: [published]
workflow_dispatch:
inputs:
tag_name:
description: 'Release tag to publish (e.g., v1.4.0)'
required: true
type: string
test_mode:
description: 'Test mode: open PR to your fork instead of upstream BCR'
required: false
type: boolean
default: false
jobs:
publish-to-bcr:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
attestations: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.release.tag_name || inputs.tag_name }}
- name: Publish modules to BCR
uses: bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml@v1
with:
tag_name: ${{ github.event.release.tag_name || inputs.tag_name }}
registry_fork: CodSpeedHQ/bazel-central-registry
# TODO: Change this back to bazel-central-registry when ready
registry: CodSpeedHQ/bazel-central-registry
attest: true
secrets:
publish_token: ${{ secrets.BCR_PUBLISH_TOKEN }}