fix(release): hand release PR to a human and ship the prebuilt npm bin - #5
Conversation
The release workflow previously merged the release commit to main itself
via `gh pr merge` (github-actions[bot]). Replace the auto-merge with a
handoff: the workflow opens PR release/vX.Y.Z, waits for the CI check,
and stops with a notice. A human merges it with 'Create a merge commit';
the follow-up run triggered by that merge resumes the release
idempotently and only then publishes to npm and creates the GitHub
release (both steps are now gated on the release commit being on main).
GitHub release notes previously used the whole CHANGELOG.md as the body,
which included ancient, non-conventional commit history ('Unset',
'Workflow', 'V1.0', ...). Notes now cover only the current release (the
first `## [v…]` section of CHANGELOG.md).
Also add the git-cliff docs (git-cliff.org/docs; git-cliff.com does not
resolve) as a reference in docs/release.md and docs/development.md, and
document the human-merge release flow.
|
Warning Review limit reached
Next review available in: 8 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughThe release workflow now opens a release PR without auto-merging it. After a human merges it onto ChangesRelease workflow and documentation
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Maintainer
participant ReleaseWorkflow as Release workflow
participant CI
participant Main as main
participant NPM
participant GitHubRelease as GitHub release
ReleaseWorkflow->>Maintainer: Open release PR
ReleaseWorkflow->>CI: Wait for required checks
CI-->>ReleaseWorkflow: Report success
Maintainer->>Main: Merge release PR
Main-->>ReleaseWorkflow: Confirm release commit
ReleaseWorkflow->>NPM: Publish package
ReleaseWorkflow->>GitHubRelease: Create release with current changelog notes
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/release.yml:
- Around line 209-214: Update the NOTES extraction in the release workflow to
anchor on the exact ## [${RELEASE_VERSION}] changelog heading, then capture
content until the next ## [ heading. Make the awk command fail closed by exiting
nonzero when that version section is absent, rather than returning the full
changelog; preserve the existing gh release create usage with NOTES.
- Line 140: Update the release workflow’s on_main/tag validation around the
on_main output so it requires the tag commit’s tree to match HEAD^{tree}, rather
than only accepting the tag as an ancestor. If the trees differ, stop the
release path; otherwise preserve the existing follow-up build and npm publish
behavior.
- Line 149: Update the release PR creation command’s --body value to provide
actual line breaks between the release message and merge instructions, using
printf, a heredoc, or --body-file instead of embedded literal \n sequences.
Preserve the existing text and formatting as separate paragraphs.
- Around line 160-169: Update the CI conclusion case handling in the release
workflow’s polling loop to explicitly handle NEUTRAL, STALE, SKIPPED,
STARTUP_FAILURE, TIMED_OUT, and ACTION_REQUIRED for the “Check, test, and build”
check. Fail the workflow with a clear error for these terminal non-success
states instead of continuing to poll until timeout, while preserving the
existing SUCCESS behavior.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 7b9750fd-9910-4df1-a59e-d9684f5d41e8
📒 Files selected for processing (3)
.github/workflows/release.ymldocs/development.mddocs/release.md
The published package's bin pointed at src/index.ts, which Node 24 refuses to execute under node_modules (ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING), so an installed `iconsur` crashed on every command. Point the bin at the prebuilt dist/index.cjs (already produced by vp pack) and rebuild it in a new prepack hook so npm pack/pnpm publish always ship a fresh bundle. The release workflow builds the pkg binaries after publish so prepack never packs them into the npm tarball; they are rebuilt for the GitHub release.
# Conflicts: # .github/workflows/release.yml
- Guard the on_main path: the release tag's tree must equal HEAD^{tree},
not merely be an ancestor, so the follow-up build/publish can never
diverge from the tagged source.
- Pass real line breaks to gh pr create --body (printf) so the release
message and merge instructions render as separate paragraphs.
- Treat NEUTRAL/STALE/SKIPPED/STARTUP_FAILURE/TIMED_OUT/ACTION_REQUIRED
CI conclusions as terminal failures instead of polling until timeout.
- Anchor GitHub release notes to the exact "## [version]" changelog
heading and fail closed when the section is missing.
Two fixes to the release/packaging pipeline.
1. Release PRs are handed to a human, never auto-merged
Follow-up to #3. The release workflow introduced there auto-merged the release commit (
gh pr mergeas github-actions[bot]) and used the entireCHANGELOG.mdas GitHub release notes.Open release PR and wait for CInow stops after CI passes and prints the PR URL — the release commit is never auto-merged.on_main=truegating).## [v…]section ofCHANGELOG.md).2. The npm
iconsurbin runs the prebuilt bundleThe published bin pointed at
src/index.ts, which Node 24 refuses to execute undernode_modules(ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING) — every installediconsurcommand crashed with that error.binnow points atdist/index.cjs(the tsdown bundle already produced byvp pack), rebuilt by a newprepackscript onnpm pack/pnpm publish.prepacknever packs them into the npm tarball; they are rebuilt immediately before the GitHub release. Gated onon_mainlike publish and the GitHub release.3. Docs
docs/release.mddocuments the human-merge flow and adds a References section.docs/development.mdnotes the prebuilt-bin packaging; README reflects the npm install behavior.