Skip to content

Commit 10cf997

Browse files
committed
Add BCR workflow for Bazel Central Registry publishing
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
1 parent f8c573d commit 10cf997

File tree

4 files changed

+67
-0
lines changed

4 files changed

+67
-0
lines changed

.bcr/metadata.template.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"homepage": "https://github.com/fastfloat/fast_float",
3+
"maintainers": [
4+
{
5+
"email": "byvoid@byvoid.com",
6+
"github": "BYVoid",
7+
"name": "Carbo Kuo",
8+
"github_user_id": 245270
9+
}
10+
],
11+
"repository": [
12+
"github:fastfloat/fast_float"
13+
],
14+
"versions": [],
15+
"yanked_versions": {}
16+
}

.bcr/presubmit.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
matrix:
2+
platform:
3+
- debian10
4+
- ubuntu2004
5+
- ubuntu2204
6+
- macos
7+
- macos_arm64
8+
- windows
9+
bazel:
10+
- 9.*
11+
- 8.x
12+
- 7.x
13+
- 6.x
14+
tasks:
15+
verify_targets:
16+
name: Verify build targets
17+
platform: ${{ platform }}
18+
bazel: ${{ bazel }}
19+
build_targets:
20+
- '@fast_float'

.bcr/source.template.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"integrity": "",
3+
"strip_prefix": "{REPO}-{VERSION}",
4+
"url": "https://github.com/{OWNER}/{REPO}/archive/refs/tags/v{VERSION}.tar.gz"
5+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Publish to BCR
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
# Allow manual triggering from GH UI
8+
workflow_dispatch:
9+
inputs:
10+
tag_name:
11+
description: 'Tag name to publish (e.g., v1.2.3)'
12+
required: true
13+
type: string
14+
15+
permissions:
16+
id-token: write
17+
attestations: write
18+
contents: write
19+
20+
jobs:
21+
publish:
22+
uses: bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml@v1.0.0
23+
with:
24+
tag_name: ${{ github.event.release.tag_name || inputs.tag_name }}
25+
secrets:
26+
publish_token: ${{ secrets.BCR_PUBLISH_TOKEN }}

0 commit comments

Comments
 (0)