Skip to content

Adopt publish-to-bcr to auto-publish releases to the Bazel Central Registry #132

Description

@j-tesla

Background

HdrHistogram_c is available in the Bazel Central Registry (BCR) as the module hdrhistogram_c, used by Bazel projects via Bzlmod. Until recently it was pinned at 0.11.2. I just opened a PR to add 0.11.9: bazelbuild/bazel-central-registry#8707.

The BCR entry currently has "No Maintainer Specified", which is why versions had been lagging behind upstream releases.

Proposal

Adopt the Publish to BCR GitHub App in this repository so that future HdrHistogram_c releases automatically open BCR PRs without anyone needing to remember.

What it requires

A one-time setup committed to this repo:

  1. Install the Publish to BCR GitHub App on HdrHistogram/HdrHistogram_c.
  2. Add a .bcr/ directory to this repo with templates the bot will use to file BCR PRs:
    • .bcr/metadata.template.json — module metadata, including maintainers.
    • .bcr/source.template.json — source URL pattern (uses {VERSION} substitution against the release tag).
    • .bcr/presubmit.yml — Bazel CI matrix to run on each new version (build the @hdrhistogram_c//:hdrhistogram_c target, same as today's BCR config).
    • .bcr/patches/ — the BUILD.bazel and MODULE.bazel add-patches (since this repo doesn't ship Bazel build files).

What it gets you

  • New GitHub releases automatically file a BCR PR within minutes of being published.
  • Downstream Bazel users (including projects that have to backfill versions today, like the PR linked above) get the new version without waiting for someone to notice and submit it.
  • Zero maintenance burden after the initial setup — the bot runs unattended on each release tag.

References

Happy to put up the .bcr/ directory as a PR if there's interest — most of the contents can be lifted directly from the existing BCR entry.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions