diff --git a/.github/workflows/publishServer.yml b/.github/workflows/publishServer.yml index 98a5f558..00a5fd18 100644 --- a/.github/workflows/publishServer.yml +++ b/.github/workflows/publishServer.yml @@ -9,7 +9,7 @@ jobs: permissions: contents: read - id-token: write # The OIDC ID token is used for authentication with JSR. + id-token: write # The OIDC ID token is used for authentication with JSR and NPM env: NODE_VERSION: '22.x' @@ -24,8 +24,12 @@ jobs: with: node-version: ${{ env.NODE_VERSION }} registry-url: 'https://registry.npmjs.org' - - name: Confirm installed Node version - run: node -v + - name: Upgrade NPM + # Trusted Publishing requires at least npm 11.5.1 + run: npm install -g npm@^11.5.1 + + - name: Confirm installed Node and NPM versions + run: 'echo "Node: $(node -v)" && echo "NPM: $(npm -v)"' # Install Deno - name: Setup Deno ${{ env.DENO_VERSION }} @@ -56,5 +60,3 @@ jobs: # Publish to JSR and NPM - name: Publish to JSR and NPM run: deno task publish:server - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}