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

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
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
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sbc100 ,
You'll need a fork

Copy link
Collaborator

Choose a reason for hiding this comment

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

Is that because the workflow involves sending a PR to the upstream bazel-central-registry?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's my understanding yes

# 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
Contributor 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
Contributor Author

Choose a reason for hiding this comment

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