name: "Publish to Bazel Central Registry" on: # Manual kick-off (you type the tag) workflow_dispatch: inputs: tag_name: description: "Tag to publish" required: true type: string # Fire as soon as the Release workflow completes workflow_run: workflows: - Release types: - completed permissions: attestations: write contents: write id-token: write jobs: publish: uses: bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml@v0.0.4 # Only run on manual dispatch, or when Release finishes successfully if: | github.event_name == 'workflow_dispatch' || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') with: tag_name: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name || github.event.workflow_run.head_branch }} registry_fork: ArthurSonzogni/bazel-central-registry secrets: publish_token: ${{ secrets.PUBLISH_TOKEN }}