diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index 26ef2a6a3..620604103 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -24,9 +24,15 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} - # Tokenless trusted publishing requires npm >= 11.5; Node 22 ships npm 10. - - name: Upgrade npm - run: npm install -g npm@latest + # Tokenless trusted publishing needs npm >= 11.5.1. The repo's .nvmrc + # pins Node 22 (npm 10), and `npm install -g npm@latest` self-upgrade is + # broken on that npm (MODULE_NOT_FOUND 'promise-retry'). So switch the + # publish steps to Node 24, which already bundles npm 11.6+. + - name: Use Node with npm 11+ + uses: actions/setup-node@v4 + with: + node-version: "24" + registry-url: "https://registry.npmjs.org" - name: Build packages run: yarn turbo run build --filter='./packages/*'