Skip to content

Commit 89a7f6d

Browse files
1technophileclaude
andauthored
publish_npm: use Trusted Publishing (OIDC) for auth, not NPM_TOKEN (#700)
Trusted Publishing is now configured on npmjs.org for theengs-decoder (repo: theengs/decoder, workflow: publish_npm.yml). The v2.3.0 publish still returned 404 because: - Node 20 ships with npm 10.x, which only uses OIDC for provenance attestation. Authentication still relied on NODE_AUTH_TOKEN, and the NPM_TOKEN secret is no longer valid, so PUT was rejected. - Full OIDC auth for npm publish requires npm 11.5.1+. Upgrade npm to latest before publishing, and drop the NODE_AUTH_TOKEN env from the publish steps so the CLI uses the Trusted Publisher flow end-to-end. The NPM_TOKEN secret can be removed from the repo once this lands. Co-authored-by: Florian <1technophile@users.noreply.github.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 7726c16 commit 89a7f6d

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

.github/workflows/publish_npm.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ jobs:
2828
node-version: '20'
2929
registry-url: 'https://registry.npmjs.org'
3030

31+
- name: Upgrade npm for Trusted Publishing
32+
run: npm install -g npm@latest
33+
3134
- name: Set up Emscripten
3235
uses: mymindstorm/setup-emsdk@v14
3336
with:
@@ -70,12 +73,8 @@ jobs:
7073

7174
- name: Publish theengs-decoder to npm
7275
working-directory: nodejs/theengs-decoder
73-
env:
74-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
7576
run: npm publish --provenance --access public
7677

7778
- name: Publish node-red-contrib-theengs-decoder to npm
7879
working-directory: nodejs/node-red-contrib-theengs-decoder
79-
env:
80-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
8180
run: npm publish --provenance --access public

0 commit comments

Comments
 (0)