fix(ci): npm publish fails with Cannot find module 'yargs' - #101
Conversation
|
Warning Review limit reached
Next review available in: 42 minutes Limit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe release workflow now supports manual dispatch for npm republishing from an existing tag. Manual runs select and check out the requested tag, build the distribution structure, restore and verify published binaries, and skip Docker, attestations, beta promotion, and installer jobs. Push-triggered releases retain the release flow. The npm publisher installs dependencies with build and post-install scripts disabled. Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: 🔴 Critical · up to The new manual release path can currently check out branch or pull-request code while running with write and OIDC permissions, allowing untrusted code to execute with privileged access; this must be restricted to tags before merge. The artifact-selection step also needs fail-fast handling to avoid publishing with incomplete selections. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: e4d83249-5ef1-4054-b9f9-2282016e3eb4
📒 Files selected for processing (1)
.github/workflows/release.yml
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.
Cannot find module 'yargs'
The npm publish step of the release workflow fails:
(see the v2.0.0 run)
The reason for this is we avoid installing dependencies for goreleaser-npm-publisher while holding an Actions token with the
id-token: writepermission (which is required for trusted publishing).The dependencies do have to be installed, however. In this PR, we install them with
--mode=skip-build, which ensures that any install/post-install scripts are skipped. I have confirmed that none of goreleaser-npm-publisher's dependencies need them.This workaround will be removed along with the goreleaser-npm-publisher fork once evg4b/goreleaser-npm-publisher#26 is released.
We're also adding a
workflow_dispatchtrigger to the release workflow, allowing it to run against an arbitrary tag, which should help us release 2.0.0 to npm.