chore: update publish workflow to support npm OIDC#559
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe publish workflow is modernized to support OIDC-based package authentication. Node is upgraded from 20 to 24, actions/setup-node moves from v3 to v4, and the build job's test step is disabled. The publish step now uses provenance and public access flags with OIDC authentication instead of NODE_AUTH_TOKEN. ChangesPublish Workflow Modernization
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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
🧹 Nitpick comments (1)
.github/workflows/publish.yml (1)
18-18: ⚡ Quick winBump
actions/checkout@v3to v4 while modernizing.actionlint flags
actions/checkout@v3as too old to run on current GitHub Actions runners (it uses the deprecated Node 16 runtime). Since this PR is already modernizingsetup-nodeand Node, it's a good opportunity to upgrade both checkout invocations as well.🔧 Proposed fix
build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-node@v4publish-npm: needs: build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4Also applies to: 29-29
🤖 Prompt for 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. In @.github/workflows/publish.yml at line 18, The workflow uses an outdated checkout action tag "uses: actions/checkout@v3" (present twice) which actionlint flags; update both occurrences to "uses: actions/checkout@v4" to use the modern runner/runtime, then run the linter/CI to ensure no other workflow compatibility issues remain.
🤖 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/publish.yml:
- Line 30: The publish-npm job still uses actions/setup-node@v3 while the build
job was bumped to actions/setup-node@v4; update the publish-npm job's setup step
(the actions/setup-node usage) to actions/setup-node@v4 so both jobs are
consistent and no longer rely on the deprecated v3/Node 16 runner.
- Line 23: The CI workflow currently has the tests step disabled (the commented
out line "#- run: yarn test"), which allows the build job — and thus the
dependent publish-npm job — to proceed without running tests; restore test
gating by uncommenting the "run: yarn test" step in the build job (or
move/replicate the test step into a required pre-release workflow that the
publish job depends on) so that the build job fails when tests fail and prevents
publish-npm from running.
---
Nitpick comments:
In @.github/workflows/publish.yml:
- Line 18: The workflow uses an outdated checkout action tag "uses:
actions/checkout@v3" (present twice) which actionlint flags; update both
occurrences to "uses: actions/checkout@v4" to use the modern runner/runtime,
then run the linter/CI to ensure no other workflow compatibility issues remain.
🪄 Autofix (Beta)
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: defaults
Review profile: CHILL
Plan: Pro
Run ID: 8e78003c-ef04-428d-9778-c5c359851912
📒 Files selected for processing (1)
.github/workflows/publish.yml
Summary by CodeRabbit