Skip to content

Commit 07f5ab3

Browse files
committed
Fix workflow to follow official npm Trusted Publisher pattern
- Update Node.js to version 20 - Add npm@latest update step - Remove debugging steps - Keep provenance flag for supply chain security
1 parent 4104a22 commit 07f5ab3

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

.github/workflows/publish.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,12 @@ jobs:
2626
- name: Setup Node.js
2727
uses: actions/setup-node@v4
2828
with:
29-
node-version: '18'
29+
node-version: '20'
3030
registry-url: 'https://registry.npmjs.org'
3131

32+
- name: Update npm
33+
run: npm install -g npm@latest
34+
3235
- name: Install dependencies
3336
run: npm ci
3437

@@ -80,13 +83,6 @@ jobs:
8083
echo "should-publish=$SHOULD_PUBLISH" >> $GITHUB_OUTPUT
8184
echo "Should publish: $SHOULD_PUBLISH"
8285
83-
- name: Debug npm authentication
84-
if: steps.version-check.outputs.should-publish == 'true'
85-
run: |
86-
echo "Checking npm authentication..."
87-
npm whoami || echo "Not authenticated yet"
88-
echo "Registry: $(npm config get registry)"
89-
9086
- name: Publish to npm
9187
if: steps.version-check.outputs.should-publish == 'true'
9288
run: npm publish --access public --provenance

0 commit comments

Comments
 (0)