ci: harden the release path#194
Merged
Merged
Conversation
- trigger_release.sh: require running on `main` at exactly origin/main — the
tree-only diff checks passed off a just-squash-merged feature branch, so
0.11.0 got tagged on the wrong commit. Also validate the version arg is
numeric X.Y.Z; pre-flight that .bcr/patches/* still apply (so publish-to-bcr
can't fail post-tag); and replace GNU-only `sed -i`/`0,/re/` with portable
temp-file edits (BSD sed on macOS mis-parsed them -> "invalid command code M").
- main.yml: trigger on branch pushes only ('**'). Tag pushes ran the full
matrix needlessly and broke `trunk check`, which diffs against the now-gone
prior tag object after a tag move.
- release.yml: match numeric semver tags only, [0-9]+.[0-9]+.[0-9]+.
- .bcr/patches/bazelmod.patch: regenerate with 1-line context so the include()
comment-out survives dependency bumps (it broke on skylib 1.8.2 -> 1.9.0,
which is why 0.11.0's BCR publish died at "Create final entry").
Fab-Cat
approved these changes
Jun 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fallout-fixes from the 0.11.0 release mishap.
What broke
trigger_release.shwas run from a squash-merged feature branch. Its guards only checkgit diff origin/main(tree), which was empty because the branch tree == main — so it tagged the wrong commit. (Tag since moved onto main.)sed— BSDsed -ineeds a backup-suffix arg and0,/re/is GNU-only, so it parsedMODULE.bazelas the script (invalid command code M). The version bump never ran.on: [push]), andtrunk checkbroke diffing against the now-gone prior tag object after the tag move..bcr/patches/bazelmod.patchno longer applied (its context saidskylib 1.8.2/platforms 1.0.0; the tarball has1.9.0/1.1.0).Fixes
trigger_release.sh: must be onmainat exactlyorigin/main; numericX.Y.Zarg check; pre-flight that every.bcr/patches/*still applies (fails before tagging); portablesed(BSD + GNU).main.yml: branch pushes only (branches: ['**']).release.yml: numeric semver tag filter ([0-9]+.[0-9]+.[0-9]+)..bcr/patches/bazelmod.patch: regenerated with 1-line context — verified to apply to both the repo and the published 0.11.0 tarball, and won't re-break on dependency bumps.