fix(ci): replace direct push with PR creation in postpublish:release#3516
Open
svidgen wants to merge 1 commit into
Open
fix(ci): replace direct push with PR creation in postpublish:release#3516svidgen wants to merge 1 commit into
svidgen wants to merge 1 commit into
Conversation
The postpublish:release script previously ran: git fetch . release:main && git push origin main This fails because main has branch protection requiring status checks, which blocks direct pushes from CI. Replace with gh pr create to open a PR from release → main that can be admin-merged (fast-forward).
adrianjoshua-strutt
approved these changes
Jul 14, 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.
Problem
The
postpublish:releasescript runsgit push origin mainafter publishing to npm. This always fails becausemainhas branch protection requiring 2 status checks. The deploy step of the release workflow fails every time, triggering retries that publish additional empty version bumps.Fix
Replace the direct push with
gh pr createto open a PR fromrelease→main. This PR can then be admin-merged as a fast-forward.Before
After
Note
The CodeBuild environment needs
ghCLI available and authenticated. Ifghis not available in the build image, this will gracefully fail with a message instructing manual sync. The release itself (npm publish) is not affected — this only impacts the post-publish repo sync step.Context
This has been silently failing since branch protection was added to
main. Previous releases required manual PR creation (e.g., #3507) to sync version bumps back tomain.