ci(release): add rebase step before versioning to prevent push race#525
Open
charlesmulder wants to merge 3 commits into
Open
ci(release): add rebase step before versioning to prevent push race#525charlesmulder wants to merge 3 commits into
charlesmulder wants to merge 3 commits into
Conversation
tahmidefaz
previously approved these changes
Jul 21, 2026
justinorringer
previously approved these changes
Jul 21, 2026
charlesmulder
dismissed stale reviews from justinorringer and tahmidefaz
via
July 22, 2026 08:17
5f4c815
charlesmulder
force-pushed
the
cm-rebase-before-release
branch
from
July 22, 2026 08:17
dd9b86c to
5f4c815
Compare
charlesmulder
marked this pull request as draft
July 22, 2026 09:09
charlesmulder
force-pushed
the
cm-rebase-before-release
branch
from
July 22, 2026 09:45
5f4c815 to
ce71bd7
Compare
charlesmulder
marked this pull request as ready for review
July 22, 2026 09:45
charlesmulder
marked this pull request as draft
July 22, 2026 10:05
petrsimon
reviewed
Jul 22, 2026
charlesmulder
force-pushed
the
cm-rebase-before-release
branch
3 times, most recently
from
July 22, 2026 11:11
a153481 to
0a9f6e2
Compare
charlesmulder
marked this pull request as ready for review
July 22, 2026 11:14
charlesmulder
marked this pull request as draft
July 22, 2026 11:19
charlesmulder
marked this pull request as ready for review
July 22, 2026 12:19
charlesmulder
force-pushed
the
cm-rebase-before-release
branch
from
July 22, 2026 13:08
b0f09f1 to
ae67090
Compare
charlesmulder
marked this pull request as draft
July 23, 2026 09:09
charlesmulder
marked this pull request as ready for review
July 23, 2026 11:25
charlesmulder
force-pushed
the
cm-rebase-before-release
branch
from
July 23, 2026 11:37
6cc77f1 to
ff7338d
Compare
justinorringer
approved these changes
Jul 23, 2026
| if [[ "$disk_ver" == "$tag_ver" && "$disk_ver" == "$npm_ver" ]]; then | ||
| status="OK" | ||
| marker="✓" | ||
| elif [[ "$npm_ver" == "REGISTRY_ERROR" ]]; then |
Contributor
There was a problem hiding this comment.
I'm wondering what happens if $npm_ver is "NOT_ON_NPM" here? Do we need another elif?
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.
Description
Added rebase steps and deferred npm publish in release action to prevent push failures and orphaned npm versions.
Problem 1 - Push failures: Release jobs check out
github.sha(triggering commit), not main tip. When a PR merges to main while a release job is running,git push --follow-tagsfails with non-fast-forward error.Problem 2 - Tag resolution:
verify-versions.shandnx releaseusegit tag --merged HEADto resolve current version. Stale checkout can't see tags from prior queued releases → false mismatches.Problem 3 - Orphaned npm versions:
nx release --yespublishes to npm beforegit push. If push fails, npm has new versions but git doesn't → manual recovery required.Solution:
--merged HEADsees them)nx release --skip-publish(defer npm publish)nx release publish(only after push succeeds)Already present: Concurrency group with
cancel-in-progress: falseserializes release jobs.CI validation: Merge and observe next automated release. Check that:
Anything reviewers should know?
--skip-publishprevents publish in mainnx releaseinvocation; standalonenx release publishhandles publish after pushChecklist
AI disclosure
Assisted by: Claude Code