Skip to content

fix(ci): replace direct push with PR creation in postpublish:release#3516

Open
svidgen wants to merge 1 commit into
mainfrom
fix/postpublish-create-pr
Open

fix(ci): replace direct push with PR creation in postpublish:release#3516
svidgen wants to merge 1 commit into
mainfrom
fix/postpublish-create-pr

Conversation

@svidgen

@svidgen svidgen commented Jul 13, 2026

Copy link
Copy Markdown
Member

Problem

The postpublish:release script runs git push origin main after publishing to npm. This always fails because main has 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 create to open a PR from releasemain. This PR can then be admin-merged as a fast-forward.

Before

"postpublish:release": "git fetch . release:main && git push origin main"

After

"postpublish:release": "gh pr create --head release --base main --title 'chore: merge release to main [ci skip]' ..."

Note

The CodeBuild environment needs gh CLI available and authenticated. If gh is 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 to main.

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).
@svidgen svidgen requested a review from a team as a code owner July 13, 2026 22:11
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