Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: automate publishing releases to Bazel Central Registry #16014

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .bcr/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Bazel Central Registry

When protobuf is released, we want it to be published to the
Bazel Central Registry automatically:
<https://registry.bazel.build>

This folder contains configuration files to automate the publish step.
See <https://github.com/bazel-contrib/publish-to-bcr/blob/main/templates/README.md>
for authoritative documentation about these files.
23 changes: 23 additions & 0 deletions .bcr/metadata.template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"homepage": "https://github.com/protocolbuffers/protobuf",
"maintainers": [
{
"email": "sandyzhang@google.com",
"github": "zhangskz",
"name": "Sandy Zhang"
},
{
"email": "mkruskal@google.com",
"github": "mkruskal-google",
"name": "Mike Kruskal"
},
{
"email": "gberg@google.com",
"github": "googleberg",
"name": "Jerry Berg"
}
],
"repository": ["github:protocolbuffers/protobuf"],
"versions": [],
zhangskz marked this conversation as resolved.
Show resolved Hide resolved
"yanked_versions": {}
}
25 changes: 25 additions & 0 deletions .bcr/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
matrix:
platform: ["debian10", "macos", "ubuntu2004", "windows"]

tasks:
verify_targets:
name: "Verify build targets"
platform: ${{ platform }}
build_targets:
- '@protobuf//:protobuf'
- '@protobuf//:protobuf_lite'
- '@protobuf//:protoc'
- '@protobuf//:test_messages_proto2_cc_proto'
- '@protobuf//:test_messages_proto3_cc_proto'

bcr_test_module:
module_path: "examples"
matrix:

platform: ["debian10", "macos", "ubuntu2004", "windows"]
tasks:
run_test_module:
name: "Run test module"
platform: ${{ platform }}
build_targets:
- "//..."
5 changes: 5 additions & 0 deletions .bcr/source.template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"integrity": "**leave this alone**",
"strip_prefix": "{REPO}-{VERSION}",
"url": "https://github.com/{OWNER}/{REPO}/releases/download/{TAG}/{REPO}-{VERSION}.zip"
}
Loading