Skip to content

Commit 02d2d9c

Browse files
authored
feat: configure new publish-to-bcr workflow (#498)
* feat: configure new publish-to-bcr workflow * chore: green up buildifier CI
1 parent b319f06 commit 02d2d9c

File tree

3 files changed

+39
-2
lines changed

3 files changed

+39
-2
lines changed

.github/workflows/publish.yaml

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

.github/workflows/release.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,13 @@ on:
1515

1616
jobs:
1717
release:
18-
uses: bazel-contrib/.github/.github/workflows/release_ruleset.yaml@cb461f299b8d472a82d1d88c4cef7d6013721742 # 2024-12-03
18+
uses: bazel-contrib/.github/.github/workflows/release_ruleset.yaml@540bb73a286db90d2f82d337d0adec21d3d54d7b # 2025-03-14
1919
with:
2020
prerelease: false
2121
release_files: rules_lint-*.tar.gz
2222
tag_name: ${{ inputs.tag_name }}
23+
publish:
24+
needs: release
25+
uses: ./.github/workflows/publish.yaml
26+
with:
27+
tag_name: ${{ inputs.tag_name }}

example/src/cpp/lib/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ cc_library(
1313
"hello-time.h",
1414
"xhello-time.h",
1515
],
16-
local_defines = ["LOCAL_DEFINE_IS_DEFINED=\\\"a_string\\\""],
1716
includes = ["."],
17+
local_defines = ["LOCAL_DEFINE_IS_DEFINED=\\\"a_string\\\""],
1818
visibility = ["//src/cpp/main:__pkg__"],
1919
)

0 commit comments

Comments
 (0)