Skip to content

ci: auto-publish releases to the BCR via reusable workflow#54

Merged
helly25 merged 2 commits into
mainfrom
ci/bcr-publish
Jun 15, 2026
Merged

ci: auto-publish releases to the BCR via reusable workflow#54
helly25 merged 2 commits into
mainfrom
ci/bcr-publish

Conversation

@helly25

@helly25 helly25 commented Jun 14, 2026

Copy link
Copy Markdown
Owner

Rolls out the BCR auto-publish workflow to proto (proven on bashtest #9275, bzl #9276; mbo #191 merged).

  • publish.yaml: publish-to-bcr@v1.4.1, registry_fork: helly25/bazel-central-registry, draft PR, URL-based integrity. Top-level permissions: {} (checkov CKV2_GHA_1) + publish job opts into contents: write.
  • release.yml: publish job needs: release, grants contents: write.

BCR_PUBLISH_TOKEN is set on proto. Independent of the in-flight refactor (touches only publish.yaml + release.yml). After merge, the next tagged release opens a draft BCR PR for helly25_proto.

helly25 and others added 2 commits June 14, 2026 22:24
Mirror bashtest/bzl/mbo: add publish.yaml (bazel-contrib/publish-to-bcr@v1.4.1,
registry_fork helly25/bazel-central-registry, draft PR, URL-based integrity)
and hook it into release.yml after the release job. Replaces the retired
publish-to-bcr GitHub App.

publish.yaml sets top-level `permissions: {}` (checkov CKV2_GHA_1) with the
publish job opting into contents:write; the release.yml publish job grants
contents:write (a called workflow can't exceed the caller's permissions).
@helly25 helly25 requested a review from Fab-Cat June 14, 2026 21:29
@helly25 helly25 enabled auto-merge (squash) June 14, 2026 21:36
@helly25 helly25 merged commit dfd774b into main Jun 15, 2026
24 checks passed
@helly25 helly25 deleted the ci/bcr-publish branch June 15, 2026 07:12
helly25 added a commit that referenced this pull request Jun 20, 2026
Adapt the remaining release-process fixes from mbo's 0.11.1 (the BCR auto-publish
half already landed in #54), so proto can cut a working release.

- release_prep.sh: archive the patched/generated worktree via a throwaway index
  instead of `git archive "${TAG}"`. The latter reads the committed tree and
  silently dropped the edits release_prep makes (the bazelmod.patch hunk that
  comments out the dev-only includes, the generated empty root BUILD.bazel) -- so
  released tarballs shipped with the dev includes active and did not build
  standalone. Verified: the archive's MODULE.bazel now has the includes commented
  and dev dirs are export-ignored.
- Drop .bcr/patches/bazelmod.patch and its `bcr-bazelmod-patch-applies`
  pre-commit hook: the tarball is now self-contained, so publish-to-bcr needs no
  patch (removes the stale-patch failure mode that broke prior publishes; the BCR
  entry's MODULE.bazel is the tarball's directly).
- trigger_release.sh: require running on main at exactly origin/main; validate the
  version arg is numeric X.Y.Z; portable BSD/GNU sed for the version bump and
  CHANGELOG prepend; pre-flight that .github/workflows/bazelmod.patch still
  applies. Keep the simple flow -- open the version-bump PR and stop, leaving
  review+merge to another maintainer (no self-approve/admin-merge).
- release.yml: trigger on numeric-semver tags only ([0-9]+.[0-9]+.[0-9]+).
- main.yml: trigger on branch pushes only, so release tags don't re-run the full
  matrix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants