chore: switch npm publishing to trusted publishing, drop NPM_TOKEN#41
Conversation
Co-authored-by: Primajin <[email protected]>
|
@copilot but I have asked you if the npm publish could be automated again. It is still set to workflow dispatch, which reads as "manual button press" to me. Before we had the issue that it didn't start when set to "on release" - is that now possible again? |
Publishing is already fully automated — no button press needed. The
|
|
@copilot but how could I automatically push a new release to npm once release please created the release? Is there really no way? |
It already does — that's exactly what the
The key is
|
|
There was a problem hiding this comment.
Pull request overview
This PR updates the repository’s npm publishing GitHub Actions workflows to rely exclusively on npm’s OIDC trusted publishing (via id-token: write + environment: npm) by removing the legacy NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} configuration.
Changes:
- Remove
NODE_AUTH_TOKENfrom thenpm publishstep in the Release Please-driven publishing workflow. - Remove
NODE_AUTH_TOKENfrom the manualworkflow_dispatchnpm publishing workflow.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| .github/workflows/release-please.yml | Removes legacy token-based npm auth from the automated publish job, leaving OIDC trusted publishing as the only auth mechanism. |
| .github/workflows/npm-publish.yml | Removes legacy token-based npm auth from the manual publish workflow to match OIDC trusted publishing usage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot ok then one final change please. In an earlier commit we removed the link to npm from the demo page because it pointed to the wrong gyros npm package - now that we have our own package under my namespace we can bring back that link |
Co-authored-by: Primajin <[email protected]>
2026-07-11T06:25:11.255Z-iPad_Pro_landscape-eba1356.png2026-07-11T06:25:11.255Z-iPad_Pro-eba1356.png2026-07-11T06:25:11.255Z-iPhone_13-eba1356.png |
Console Logs✅ No logs were captured |
Done in commit 84ab999 — the demo footer now includes the npm link again, pointing to |
2026-07-11T06:29:17.626Z-iPad_Pro_landscape-c8daf67.png2026-07-11T06:29:17.626Z-iPad_Pro-c8daf67.png2026-07-11T06:29:17.626Z-iPhone_13-c8daf67.png |






Both publishing workflows still passed
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}despite already havingid-token: writeandenvironment: npmconfigured for OIDC trusted publishing. This removes the legacy token-based auth.Changes
.github/workflows/release-please.yml— removeNODE_AUTH_TOKENenv frompublish-npmjob; automated publishing via Release Please remains unchanged.github/workflows/npm-publish.yml— same removal; manualworkflow_dispatchfallback is preservedResult
Publishing stays automated through
release-please.yml(triggered on release creation, avoiding the priorGITHUB_TOKENtrigger-suppression issue).npm-publish.ymlremains as a manual recovery path. Both now rely solely on the npm trusted publisher OIDC configuration.