ci(upgrade): adopt BYK/binpatch action for delta patch generation/publish - #1330
Merged
Conversation
…lish Replaces the hand-rolled ~250 lines of `generate-patches` and `publish-nightly` bash in `.github/workflows/ci.yml` with the `BYK/binpatch/action@v0.4.1` composite action. The action handles: - ORAS CLI install + GHCR login - Previous-nightly discovery (with the same-series filter that fixes the cross-major nightly tag confusion) - zig-bsdiff invocation + patch size gate (50% ratio) - Binary + versioned-tag + patch manifest push with `from-version` annotation threaded via action outputs This eliminates the divergence bug we hit twice: - The PREV_TAG recomputation divergence between generate-patches and publish-nightly (PR #1327 fixed this in the hand-rolled shell; the action solves it generically by exposing `generate-ghcr.outputs.from-version` and consuming it as a `publish-ghcr` input — see BYK/binpatch#40) - The cross-major nightly tag confusion (PR #1329 fixed this in the hand-rolled shell; the action's `validateChainStep` does the equivalent check at chain-resolution time) Also bumps the `binpatch` runtime dep from `^0.3.1` to `^0.4.1` for the new `openSync`/`writeSync`/`closeSync` output path (which avoids the ETXTBSY race when chaining into a `spawn(tempPath)`). Files: - .github/workflows/ci.yml: -220 lines of hand-rolled shell, +10 lines of action wiring - packages/cli/package.json: binpatch ^0.3.1 → ^0.4.1 - pnpm-lock.yaml: regenerated
BYK/binpatch#44 ported the same-series filter from #1329 into the binpatch action's prev-ghcr step, so consumers adopting `generate-ghcr` no longer need to re-implement this safeguard. This bumps both the runtime dep (`binpatch` ^0.4.1 → ^0.4.2) and the action ref (BYK/binpatch/action@0.4.1 → @0.4.2) so the migration actually picks up the action's own fix.
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 079ea28. Configure here.
Contributor
|
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.

Replaces the hand-rolled ~250 lines of
generate-patchesandpublish-nightlybash in.github/workflows/ci.ymlwith theBYK/binpatch/action@v0.4.1composite action. The action handles:from-versionannotation threaded via action outputsThis eliminates the divergence bug we hit twice:
generate-ghcr.outputs.from-versionand consuming it as apublish-ghcrinput — see fix(action): publish-ghcr re-derives from-version independently of generate-ghcr BYK/binpatch#40)validateChainStepdoes the equivalent check at chain-resolution time)Also bumps the
binpatchruntime dep from^0.3.1to^0.4.1for the newopenSync/writeSync/closeSyncoutput path (which avoids the ETXTBSY race when chaining into aspawn(tempPath)).Files
.github/workflows/ci.yml: -220 lines of hand-rolled shell, +10 lines of action wiringpackages/cli/package.json: binpatch ^0.3.1 → ^0.4.1pnpm-lock.yaml: regeneratedDiff
Verification
node -e 'require("yaml").parse(...)'parses cleanlypnpm --filter sentry run typecheck: cleanpnpm --filter sentry run lint: clean