Skip to content

Commit

Permalink
Add Bazel central registry files (#780)
Browse files Browse the repository at this point in the history
* Add BCR publish files and publish to BCR action

* Add bzlmod snippets for release notes and README
  • Loading branch information
luispadron authored Oct 24, 2023
1 parent 7b07ab6 commit 3091cd6
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .bcr/metadata.template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"homepage": "https://github.com/bazel-ios/rules_ios",
"maintainers": [
{
"email": "[email protected]",
"name": "rules_ios Maintainers"
}
],
"repository": [
"github:bazel-ios/rules_ios"
],
"versions": [],
"yanked_versions": {}
}
12 changes: 12 additions & 0 deletions .bcr/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
bcr_test_module:
module_path: "e2e/bzlmod"
matrix:
platform: ["macos"]
tasks:
build_flags:
- "--config=ios"
run_tests:
name: "Run test module"
platform: ${{ platform }}
build_targets:
- "//..."
5 changes: 5 additions & 0 deletions .bcr/source.template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"integrity": "",
"strip_prefix": "",
"url": "https://github.com/{OWNER}/{REPO}/releases/download/{TAG}/{REPO}.{TAG}.tar.gz"
}
6 changes: 6 additions & 0 deletions .github/workflows/generate_release_notes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ readonly release_archive="rules_ios.$new_version.tar.gz"
sha=$(shasum -a 256 "$release_archive" | cut -d " " -f1)

cat <<EOF
### Bzlmod Snippet
\`\`\`bzl
bazel_dep(name = "rules_ios", version = "$new_version", repo_name = "build_bazel_rules_ios")
\`\`\`
### Workspace Snippet
\`\`\`bzl
Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,21 @@ for the documentation.

## Getting started

### Bzlmod setup

Add the Bazel module to your `MODULE.bazel` file:
See the [latest release](https://github.com/bazel-ios/rules_ios/releases/latest) for an up-to-date snippet!

```bzl
bazel_dep(name = "rules_ios", version = "x.x.x", repo_name = "build_bazel_rules_ios")
```

### WORKSPACE setup

Add the following lines to your `WORKSPACE` file.
See the [latest release](https://github.com/bazel-ios/rules_ios/releases/latest) for an up-to-date snippet!

```python
```bzl
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

# See https://github.com/bazel-ios/rules_ios/releases/latest
Expand Down

0 comments on commit 3091cd6

Please sign in to comment.