Skip to content

Commit 7d2f283

Browse files
committed
chore(release): setup new publish-to-bcr
1 parent cc4c9d5 commit 7d2f283

File tree

2 files changed

+46
-2
lines changed

2 files changed

+46
-2
lines changed

.github/workflows/publish.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
on:
2+
# Run the publish workflow after a successful release
3+
# Will be triggered from the release.yaml workflow
4+
workflow_call:
5+
inputs:
6+
tag_name:
7+
required: true
8+
type: string
9+
secrets:
10+
publish_token:
11+
required: true
12+
# In case of problems, let release engineers retry by manually dispatching
13+
# the workflow from the GitHub UI
14+
workflow_dispatch:
15+
inputs:
16+
tag_name:
17+
required: true
18+
type: string
19+
20+
jobs:
21+
publish:
22+
uses: bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml@v0.0.4
23+
with:
24+
tag_name: ${{ inputs.tag_name }}
25+
# GitHub repository which is a fork of the upstream where the Pull Request will be opened.
26+
registry_fork: bazel-contrib/bazel-central-registry
27+
permissions:
28+
attestations: write
29+
contents: write
30+
id-token: write
31+
secrets:
32+
# Necessary to push to the BCR fork, and to open a pull request against a registry
33+
publish_token: ${{ secrets.BCR_PUBLISH_TOKEN }}

.github/workflows/release.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,19 @@ permissions:
1515
contents: write
1616
jobs:
1717
release:
18-
uses: bazel-contrib/.github/.github/workflows/release_ruleset.yaml@0b644c3ee5c7cd9a7657f7e782b26a599d9b6d5c # 2025-01-23
18+
uses: bazel-contrib/.github/.github/workflows/release_ruleset.yaml@v7.2.0
1919
with:
2020
prerelease: false
2121
release_files: rules_nodejs-*.tar.gz
22-
tag_name: ${{ inputs.tag_name }}
22+
tag_name: ${{ inputs.tag_name || github.ref_name }}
23+
publish:
24+
needs: release
25+
uses: ./.github/workflows/publish.yaml
26+
with:
27+
tag_name: ${{ inputs.tag_name || github.ref_name }}
28+
permissions:
29+
id-token: write
30+
attestations: write
31+
contents: write
32+
secrets:
33+
publish_token: ${{ secrets.BCR_PUBLISH_TOKEN }}

0 commit comments

Comments
 (0)