fix(ci): install npm 11 for OIDC Trusted Publishing#102
Conversation
📝 Walkthrough概要(Walkthrough)パブリッシュワークフローが 変更内容(Changes)
見積もりコードレビュー工数🎯 1 (Trivial) | ⏱️ ~3 minutes 関連の可能性のあるプルリクエスト
詩
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/publish.yml (1)
80-81: npm の最小要件である11.5.1を明示的に指定してください。現在の
npm@11は OIDC Trusted Publishing が要求する最小バージョン 11.5.1(公式ドキュメント: https://docs.npmjs.com/trusted-publishers/)よりも古いバージョンに解決される可能性があります。将来の 11.x リリースで CI 動作が変わるのを防ぐため、最小対応版に明示固定し、実行時にバージョン確認を入れることをお勧めします。推奨される変更
- - name: Upgrade npm for OIDC Trusted Publishing - run: npm install -g npm@11 + - name: Upgrade npm for OIDC Trusted Publishing + run: | + npm install -g npm@11.5.1 + npm --version🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/publish.yml around lines 80 - 81, Replace the loose npm upgrade step "Upgrade npm for OIDC Trusted Publishing" that runs `npm install -g npm@11` with a pinned minimum version of 11.5.1 by installing `npm@11.5.1`, and add a runtime verification immediately after (e.g., `npm --version`) to fail the job if the resolved npm version is older than 11.5.1; update the step name to reflect the pinned minimum version so it's clear in the workflow output.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.github/workflows/publish.yml:
- Around line 80-81: Replace the loose npm upgrade step "Upgrade npm for OIDC
Trusted Publishing" that runs `npm install -g npm@11` with a pinned minimum
version of 11.5.1 by installing `npm@11.5.1`, and add a runtime verification
immediately after (e.g., `npm --version`) to fail the job if the resolved npm
version is older than 11.5.1; update the step name to reflect the pinned minimum
version so it's clear in the workflow output.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 04ad8029-8d9f-45a8-9950-02be5cf8a0bd
📒 Files selected for processing (1)
.github/workflows/publish.yml
Summary
npm install -g npm@11を追加ENEEDAUTHの原因)registry-urlを復元(.npmrcのレジストリ設定に必要)経緯
npm install -g npm@latest削除(Node 22.22.2 との依存関係競合)NODE_AUTH_TOKEN: ""設定 →ENEEDAUTHregistry-url削除 →ENEEDAUTH(npm 10.x は OIDC 非対応が根本原因)Test plan
Summary by CodeRabbit
リリースノート