ci: pass NPM_TOKEN to semantic-release for the first npm publish - #2
Closed
dominik1001 wants to merge 1 commit into
Closed
ci: pass NPM_TOKEN to semantic-release for the first npm publish#2dominik1001 wants to merge 1 commit into
dominik1001 wants to merge 1 commit into
Conversation
Trusted publishing can only be configured on a package that already exists on the registry, so the initial release authenticates with an NPM_TOKEN secret. Once carddav-mcp exists on npm and a trusted publisher is configured for this workflow, the secret and this env line can go. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJjmg9LMuvaNqbTAXQahgU
Owner
Author
|
We published manually once, and from now on trusted publishing. |
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 first release on
mainfailed withENONPMTOKEN— expected, since npm trusted publishing can only be configured on a package that already exists on the registry, andcarddav-mcphasn't been published yet.This wires
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}into the semantic-release step so the initial0.1.0publish can authenticate with a token.To release 0.1.0 after merging
NPM_TOKENrepository secret.releasejob onmain(or land any commit).The
v0.0.0baseline tag is already seeded, so the release will be 0.1.0.Afterwards (optional but recommended)
Configure npm trusted publishing for this repo/workflow on npmjs.com, delete the
NPM_TOKENsecret, drop the env line, and add annpm install -g npm@lateststep (OIDC publishing needs npm ≥ 11.5.1).🤖 Generated with Claude Code
https://claude.ai/code/session_01WJjmg9LMuvaNqbTAXQahgU
Generated by Claude Code