Skip to content

Commit 3bbfc0b

Browse files
authored
Add workflow to publish a release to the bcr. (#998)
* Add the workflow to publish a release to the bcr. - Update .bcr metadata template - Update .bcr test matrix to drop bazel 7
1 parent 92733e2 commit 3bbfc0b

File tree

6 files changed

+67
-32
lines changed

6 files changed

+67
-32
lines changed

.bcr/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# Bazel Central Registry
22

33
When the ruleset is released, we want it to be published to the
4-
Bazel Central Registry automatically:
5-
<https://registry.bazel.build>
4+
Bazel Central Registry: <https://registry.bazel.build>
65

76
This folder contains configuration files to automate the publish step.
87
See <https://github.com/bazel-contrib/publish-to-bcr/blob/main/templates/README.md>

.bcr/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
fixedReleaser:
2-
login: aiuto
3-
2+
login: tonyaiuto
3+

.bcr/metadata.template.json

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
{
2-
"homepage": "https://github.com/bazelbuild/rules_pkg",
3-
"maintainers": [
4-
{
5-
"email": "[email protected]",
6-
"name": "Tony Aiuto"
7-
}
8-
],
9-
"repository": ["github:bazelbuild/rules_pkg"],
10-
"versions": [],
11-
"yanked_versions": {}
2+
"homepage": "https://github.com/bazelbuild/rules_pkg",
3+
"maintainers": [
4+
{
5+
"email": "[email protected]",
6+
"name": "Tony Aiuto",
7+
"github": "aiuto",
8+
"github_user_id": "3044252"
9+
}
10+
],
11+
"repository": [
12+
"github:bazelbuild/rules_pkg"
13+
],
14+
"versions": [],
15+
"yanked_versions": {}
1216
}

.bcr/presubmit.yml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
build_targets: &build_targets
2-
- '@rules_pkg//...'
3-
# Re-enable those targets when toolchain registration is supported.
4-
- '-@rules_pkg//toolchains/...'
5-
- '-@rules_pkg//pkg:make_rpm'
6-
7-
platforms:
8-
centos7_java11_devtoolset10:
9-
build_targets: *build_targets
10-
debian10:
11-
build_targets: *build_targets
12-
macos:
13-
build_targets: *build_targets
14-
ubuntu2204:
15-
build_targets: *build_targets
16-
windows:
17-
build_targets: *build_targets
1+
matrix:
2+
platform:
3+
- debian10
4+
- ubuntu2004
5+
- macos
6+
- macos_arm64
7+
- windows
8+
bazel:
9+
- 8.x
10+
tasks:
11+
verify_targets:
12+
name: Verify build targets
13+
platform: ${{ platform }}
14+
bazel: ${{ bazel }}
15+
build_targets:
16+
- '@rules_pkg//...'
17+
- '-@rules_pkg//toolchains/...'
18+
- '-@rules_pkg//pkg:make_rpm'

.bcr/source.template.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"integrity": "**leave this alone**",
2+
"integrity": "",
33
"url": "https://github.com/{OWNER}/{REPO}/releases/download/{TAG}/rules_pkg-{TAG}.tar.gz"
44
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: "Publish release to BCR"
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
required: true
8+
type: "string"
9+
10+
permissions:
11+
id-token: write
12+
attestations: write
13+
contents: write
14+
15+
jobs:
16+
publish:
17+
name: "Publish to BCR"
18+
19+
permissions:
20+
attestations: write
21+
contents: write
22+
id-token: write
23+
24+
uses: "bazel-contrib/publish-to-bcr/.github/workflows/[email protected]"
25+
with:
26+
tag_name: "${{ inputs.version }}"
27+
tag_prefix: ""
28+
registry_fork: "bazel-contrib/bazel-central-registry"
29+
draft: false
30+
secrets:
31+
publish_token: "${{ secrets.BCR_PUBLISH_TOKEN }}"

0 commit comments

Comments
 (0)