Skip to content

Commit c7ee968

Browse files
authored
Try upgrading NPM for Trusted Publishing (#1339)
# why # what changed # test plan <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Enable npm Trusted Publishing in the release workflow by upgrading to setup-node v4 and installing npm 11.5+ in CI. This should allow tokenless canary publishes from CI. ## Why: - Trusted Publishing requires npm >= 11.5.1. - Our release job used setup-node v3 and an older npm. ## What: - Upgrade actions/setup-node from v3 to v4 in release.yml. - Add step to install latest npm globally (ensures >= 11.5.1). ## Test Plan: - [ ] Run the canary release workflow on this branch. - [ ] Verify npm -v in logs shows >= 11.5.1. - [ ] Confirm publish succeeds without NPM_TOKEN (uses OIDC Trusted Publishing). - [ ] Check the canary publish on npm (version and tag). <sup>Written for commit 7ab34e4. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. -->
1 parent a76cc61 commit c7ee968

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,15 @@ jobs:
2121
uses: actions/checkout@v3
2222

2323
- name: Setup Node.js 20.x
24-
uses: actions/setup-node@v3
24+
uses: actions/setup-node@v4
2525
with:
2626
node-version: 20.x
2727
registry-url: "https://registry.npmjs.org"
2828

29+
# Ensure npm 11.5.1 or later is installed for Trusted Publishing.
30+
- name: Update npm
31+
run: npm install -g npm@latest
32+
2933
- name: Install dependencies
3034
run: |
3135
rm -rf node_modules
@@ -49,4 +53,4 @@ jobs:
4953
git checkout main
5054
pnpm run release-canary
5155
env:
52-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)