Repository navigation
Publish from CI with npm trusted publishing - #4
Merged
Merged
Conversation
The publish job needed an NPM_TOKEN secret the repository never had, and its provenance check would have failed anyway: package.json still pointed at Kmynes/wmctrljs, the account's former name. npm now accepts the workflow's OIDC token instead of an npm token. That needs npm 11.5.1+, so the job runs on Node 24, and npm adds provenance on its own. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
v2.0.0tag's publish job could not have worked, for two reasons:NPM_TOKENsecret: the repository never had one.npm publish --provenancechecksrepository.urlagainst the repository running the workflow. package.json still saidKmynes/wmctrljs, the account's former name.This PR:
repository,bugsandhomepagepoint atkecsou/wmctrljs.id-token: writewas already set) instead of an npm token, and adds provenance on its own. The secret and--provenanceare gone. The job runs on Node 24, because trusted publishing needs npm 11.5.1+.The version stays 2.0.0. 2.0.0 is already on npm, and this changes no published code.
Before the next release
npm must list this workflow as the package's trusted publisher. Run this once, as the package owner:
Or set it on npmjs.com under the package's Settings, Trusted Publisher, GitHub Actions:
kecsou/wmctrljs/ci.yml.Test plan
v*tag, so the next release is its real test🤖 Generated with Claude Code