Skip to content

Commit b7a1475

Browse files
committed
add npm upgrade step and enhance publish workflow with version logging and NODE_AUTH_TOKEN check
1 parent 80ce382 commit b7a1475

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

.github/workflows/publish.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ jobs:
3434
registry-url: https://registry.npmjs.org
3535
cache: pnpm
3636

37+
- name: Upgrade npm (required for OIDC trusted publishing)
38+
run: npm install -g npm@latest
39+
3740
- name: Debug npm auth mode
3841
run: |
3942
echo "npm: $(npm --version)"
@@ -63,13 +66,19 @@ jobs:
6366
working-directory: packages/core
6467
env:
6568
NODE_AUTH_TOKEN: ""
66-
run: npm publish --tag next --access public --ignore-scripts
69+
run: |
70+
echo "npm (publish): $(npm --version)"
71+
node -e "console.log('NODE_AUTH_TOKEN present (publish):', !!process.env.NODE_AUTH_TOKEN)"
72+
npm publish --tag next --access public --ignore-scripts
6773
6874
- name: Publish release
6975
if: github.event_name == 'release'
7076
working-directory: packages/core
7177
env:
7278
NODE_AUTH_TOKEN: ""
73-
run: npm publish --access public --ignore-scripts
79+
run: |
80+
echo "npm (publish): $(npm --version)"
81+
node -e "console.log('NODE_AUTH_TOKEN present (publish):', !!process.env.NODE_AUTH_TOKEN)"
82+
npm publish --access public --ignore-scripts
7483
7584

0 commit comments

Comments
 (0)