Add verbose npm logging #29
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish to npm | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "24" | |
| - name: Install npm@latest | |
| run: npm install -g npm@latest | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build | |
| run: pnpm build | |
| - name: Debug environment | |
| run: | | |
| echo "=== Environment ===" | |
| echo "npm: $(npm -v)" | |
| echo "node: $(node -v)" | |
| echo "OIDC URL: $ACTIONS_ID_TOKEN_REQUEST_URL" | |
| echo "OIDC TOKEN: ${ACTIONS_ID_TOKEN_REQUEST_TOKEN:+set}" | |
| echo "=== npmrc files ===" | |
| cat ~/.npmrc 2>/dev/null || echo "No ~/.npmrc" | |
| cat .npmrc 2>/dev/null || echo "No ./.npmrc" | |
| echo "=== Package info ===" | |
| npm pkg get name version repository | |
| - name: Publish to npm with OIDC | |
| run: | | |
| unset NODE_AUTH_TOKEN | |
| npm publish --access public --loglevel verbose 2>&1 | |
| env: | |
| NPM_CONFIG_PROVENANCE: "true" |