Skip to content
Open
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
16 changes: 16 additions & 0 deletions .bcr/bazel/metadata.template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"homepage": "https://emscripten.org",
"maintainers": [
{
"name": "Sam Clegg",
"email": "sbc@chromium.org",
"github": "sbc100",
"github_user_id": 515813
}
],
"repository": [
"github:emscripten-core/emsdk"
],
"versions": [],
"yanked_versions": {}
}
36 changes: 36 additions & 0 deletions .bcr/bazel/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
matrix:
platform:
- debian13
- ubuntu2204
- windows
bazel:
- 7.x
- 8.x
- 9.x
tasks:
verify_targets:
name: Verify build targets
platform: ${{ platform }}
bazel: ${{ bazel }}
build_targets:
- '@emsdk//hello-world:hello-world-wasm'
- '@emsdk//hello-world:hello-world-wasm-simd'
bcr_test_module:
module_path: test_external
matrix:
platform:
- debian13
- ubuntu2204
- windows
bazel:
- 7.x
- 8.x
- 9.x
tasks:
run_test_module:
name: Run test module
platform: ${{ platform }}
bazel: ${{ bazel }}
build_targets:
- //:hello-world-wasm
- //long_command_line:long_command_line_wasm
5 changes: 5 additions & 0 deletions .bcr/bazel/source.template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"integrity": "",
"strip_prefix": "{REPO}-{TAG}/bazel",
"url": "https://github.com/{OWNER}/{REPO}/archive/refs/tags/{TAG}.tar.gz"
}
8 changes: 8 additions & 0 deletions .bcr/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# See https://github.com/bazel-contrib/publish-to-bcr#a-note-on-release-automation

fixedReleaser:
login: sbc100
email: sbc@chromium.org
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kripken do we have some other email we can use here other than my (or your) personal one?


moduleRoots:
- bazel
23 changes: 23 additions & 0 deletions .github/workflows/publish-to-bcr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish to BCR
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you replace "BCR" with something like "Bazel Registry" ? Both in the name of this file and in the name field here?

The "bcr" acronym won't mean anything folks who don't work with bazel.

on:
push:
tags:
- '*'

jobs:
publish:
uses: bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml@v1.0.0
with:
tag_name: ${{ inputs.tag_name || github.ref_name }}
registry_fork: emscripten-core/bazel-central-registry
# see note on Attestation Support
attest: true
permissions:
contents: write
# Necessary if attest:true
id-token: write
# Necessary if attest:true
attestations: write
secrets:
# Necessary to push to the BCR fork, and to open a pull request against a registry
publish_token: ${{ secrets.BCR_PUBLISH_TOKEN }}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll need to create a dedicated token

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you tell me the exact steps I need to take here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use ${{ secrets.EMSCRIPTEN_BOT_TOKEN }} here? Then I will give the bot the ability to create PRs in https://github.com/emscripten-core/bazel-central-registry

Will that work?