Add BCR workflow for Bazel Central Registry publishing

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
Matthieu MOREL 2025-12-03 19:03:52 +01:00
parent f8c573d741
commit 10cf99758e
4 changed files with 67 additions and 0 deletions

View File

@ -0,0 +1,16 @@
{
"homepage": "https://github.com/fastfloat/fast_float",
"maintainers": [
{
"email": "byvoid@byvoid.com",
"github": "BYVoid",
"name": "Carbo Kuo",
"github_user_id": 245270
}
],
"repository": [
"github:fastfloat/fast_float"
],
"versions": [],
"yanked_versions": {}
}

20
.bcr/presubmit.yml Normal file
View File

@ -0,0 +1,20 @@
matrix:
platform:
- debian10
- ubuntu2004
- ubuntu2204
- macos
- macos_arm64
- windows
bazel:
- 9.*
- 8.x
- 7.x
- 6.x
tasks:
verify_targets:
name: Verify build targets
platform: ${{ platform }}
bazel: ${{ bazel }}
build_targets:
- '@fast_float'

View File

@ -0,0 +1,5 @@
{
"integrity": "",
"strip_prefix": "{REPO}-{VERSION}",
"url": "https://github.com/{OWNER}/{REPO}/archive/refs/tags/v{VERSION}.tar.gz"
}

26
.github/workflows/publish-to-bcr.yml vendored Normal file
View File

@ -0,0 +1,26 @@
name: Publish to BCR
on:
release:
types: [published]
# Allow manual triggering from GH UI
workflow_dispatch:
inputs:
tag_name:
description: 'Tag name to publish (e.g., v1.2.3)'
required: true
type: string
permissions:
id-token: write
attestations: write
contents: write
jobs:
publish:
uses: bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml@v1.0.0
with:
tag_name: ${{ github.event.release.tag_name || inputs.tag_name }}
secrets:
publish_token: ${{ secrets.BCR_PUBLISH_TOKEN }}