Add publish to BCR

This commit is contained in:
ArthurSonzogni 2025-04-26 02:38:32 +02:00
parent 8e055a5a61
commit 2a5d7646da
No known key found for this signature in database
GPG Key ID: 41D98248C074CD6C
9 changed files with 109 additions and 0 deletions

9
.bcr/README.md Normal file
View File

@ -0,0 +1,9 @@
# Bazel Central Registry
When the ruleset 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.

18
.bcr/config.yaml Normal file
View File

@ -0,0 +1,18 @@
# Copyright 2025 Arthur Sonzogni. All rights reserved.
# Use of this source code is governed by the MIT license that can be found in
# the LICENSE file.
{
"homepage": "https://github.com/ArthurSonzogni/FTXUI",
"maintainers": [
{
"name": "Arthur Sonzogni",
"email": "sonzogniarthur@gmail.com",
"github": "ArthurSonzogni"
}
],
"repository": [
"github:ArthurSonzogni/FTXUI"
],
"versions": [],
"yanked_versions": {}
}

View File

@ -0,0 +1,16 @@
{
"homepage": "https://github.com/ArthurSonzogni/FTXUI",
"maintainers": [
{
"name": "Arthur Sonzogni",
"email": "sonzogniarthur@gmail.com",
"github": "ArthurSonzogni",
"github_user_id": 4759106
}
],
"repository": [
"github:ArthurSonzogni/FTXUI"
],
"versions": [],
"yanked_versions": {}
}

25
.bcr/presubmit.yml Normal file
View File

@ -0,0 +1,25 @@
# Copyright 2025 Arthur Sonzogni. All rights reserved.
# Use of this source code is governed by the MIT license that can be found in
# the LICENSE file.
bcr_test_module:
module_path: "."
matrix:
platform: [
"debian11",
"macos",
"macos-arm64",
"ubuntu2204",
"windows",
]
bazel: [
6.x,
7.x,
8.x,
]
tasks:
run_tests:
name: "Run test module"
platform: ${{ platform }}
bazel: ${{ bazel }}
test_targets:
- "//..."

View File

@ -0,0 +1,5 @@
{
"integrity": "",
"strip_prefix": "{REPO}-{VERSION}",
"url": "https://github.com/{OWNER}/{REPO}/releases/download/{TAG}/{REPO}-{TAG}.tar.gz"
}

28
.github/workflows/publish_to_bcr.yaml vendored Normal file
View File

@ -0,0 +1,28 @@
on:
# Run the publish workflow after a successful release.
workflow_call:
inputs:
tag_name:
required: true
type: string
# Allow manual triggering of the workflow.
workflow_dispatch:
inputs:
tag_name:
required: true
type: string
jobs:
publish:
uses: bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml@[version]
with:
tag_name: ${{ inputs.tag_name }}
# GitHub repository which is a fork of the upstream where the Pull Request will be opened.
registry_fork: ArthurSonzogni/bazel-central-registry
permissions:
attestations: write
contents: write
id-token: write
secrets:
publish_token: ${{ secrets.PUBLISH_TOKEN }}

1
.gitignore vendored
View File

@ -35,6 +35,7 @@ out/
# bazel directory:
!bazel/**/*.bzl
!.bcr/*
# doc directory:
!doc/**/Doxyfile.in

View File

@ -1,3 +1,7 @@
# Copyright 2025 Arthur Sonzogni. All rights reserved.
# Use of this source code is governed by the MIT license that can be found in
# the LICENSE file.
# FTXUI Module.
module(name = "ftxui", version = "6.0.3")

View File

@ -1 +1,4 @@
# Copyright 2025 Arthur Sonzogni. All rights reserved.
# Use of this source code is governed by the MIT license that can be found in
# the LICENSE file.
workspace(name = "ftxui")