Skip to content
Merged
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
22 changes: 22 additions & 0 deletions .bcr/metadata.template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"homepage": "https://github.com/gazebosim/gz-rendering",
"maintainers": [
{
"email": "iche@intrinsic.ai",
"github": "iche033",
"github_user_id": 4000684,
"name": "Ian Chen"
},
{
"email": "shameek@intrinsic.ai",
"github": "shameekganguly",
"github_user_id": 2412842,
"name": "Shameek Ganguly"
}
],
"repository": [
"github:gazebosim/gz-rendering"
],
"versions": [],
"yanked_versions": {}
}
18 changes: 18 additions & 0 deletions .bcr/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
matrix:
platform:
- ubuntu2004
- macos
- macos_arm64
bazel:
- 8.x
- 7.x
tasks:
verify_targets:
name: Verify build targets
platform: ${{ platform }}
bazel: ${{ bazel }}
build_flags:
- '--cxxopt=-std=c++17'
- '--host_cxxopt=-std=c++17'
build_targets:
- '@gz-rendering'
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": "",
"strip_prefix": "{REPO}-{TAG}",
"url": "https://github.com/{OWNER}/{REPO}/archive/refs/tags/{TAG}.tar.gz"
}
44 changes: 44 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Publish new releases to Bazel Central Registry.
name: Publish to BCR
on:
# For now, the workflow must be manually triggered.
workflow_dispatch:
inputs:
tag_name:
description: git tag being released
required: true
type: string
jobs:
# The publish-to-bcr reusable workflow expects the version name to be in
# semver-(optional build metadata postfix) format, but the repo tags are in
# branch_semver-postfix format. This job extracts the branch name as a prefix
# to pass to publish-to-bcr.
extract_tag_prefix:
runs-on: ubuntu-latest
outputs:
prefix: ${{ steps.extract.outputs.prefix }}
steps:
- name: Extract the tag prefix from the tag name.
id: extract
run: |
branch=$(echo "${{ inputs.tag_name }}" | cut -d'_' -f1)
prefix="${branch}_"
echo "prefix=${prefix}" | tee -a "$GITHUB_OUTPUT"

publish:
needs: extract_tag_prefix
uses: bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml@v1.0.0
with:
tag_name: ${{ inputs.tag_name }}
# GitHub repository which is a fork of the upstream where the Pull Request will be opened.
registry_fork: gazebo-forks/bazel-central-registry
attest: false
tag_prefix: ${{ needs.extract_tag_prefix.outputs.prefix }}

permissions:
attestations: write
contents: write
id-token: write
secrets:
# Necessary to push to the BCR fork, and to open a pull request against a registry
publish_token: ${{ secrets.publish_token || secrets.BCR_PUBLISH_TOKEN }}
Loading