fix(release): drop detached-HEAD version-commit step#51
Merged
Conversation
The "Commit version changes" step ran `git push` after checking out the release tag, which is a detached HEAD — so it failed every release with `fatal: You are not currently on a branch.` (exit 128). This made the macOS job red on every release even though build, asset upload, and npm publish all succeeded before it. Remove the step. release-pipeline.md already states that packages/*/package.json versions lagging the published npm versions is "expected and harmless" — CI rewrites them at publish time from the tag, so committing them back to main is unnecessary (and impossible from a detached HEAD anyway). Co-Authored-By: Claude <noreply@anthropic.com>
🔒 门禁检查结果
Rust 测试覆盖率
前端测试覆盖率
✅ 所有检查通过,可以合入
|
3 tasks
Shadow-Azure
added a commit
that referenced
this pull request
Jul 19, 2026
Release v0.4.1 to verify the detached-HEAD fix (#51) in the release workflow. No code changes since v0.4.0; this version's release.yml run should be the first with a fully green macOS job. Co-authored-by: ZN-Ice <zn-ice@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com>
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
Every
release.ymlrun since v0.3.0 has ended with the macOS job red, even though the release actually succeeds. The failing step is "Commit version changes":Root cause: on a
releaseevent the workflow checks out the tag (github.ref = refs/tags/vX.Y.Z) → detached HEAD. The step then runsgit pushto commit the CI-rewrittenpackages/*/package.jsonversions back tomain, which is impossible from a detached HEAD. Confirmed red on v0.3.0 and v0.4.0 (initial run + re-runs).Purely cosmetic — build / asset upload / npm publish all run before it and succeed — but it makes every release run look broken and masks real failures.
Solution
Delete the "Commit version changes" step entirely.
release/release-pipeline.md§ Version Management already states thatpackages/*/package.jsonversions lagging the published npm versions is "expected and harmless" — CI rewrites them at publish time from the git tag. Committing them back tomainis unnecessary, so removing the step lets the macOS job go green on release.Test Plan
ruby -ryamlconfirms the file is still valid YAMLbuild-and-release,build-linux) intact;Publish npm packagesis now the last macOS step;Commit version changesgone🤖 Generated with Claude Code