Skip to content

ci: pass NPM_TOKEN to semantic-release for the first npm publish - #2

Closed
dominik1001 wants to merge 1 commit into
mainfrom
claude/beautiful-carson-4lqy46
Closed

ci: pass NPM_TOKEN to semantic-release for the first npm publish#2
dominik1001 wants to merge 1 commit into
mainfrom
claude/beautiful-carson-4lqy46

Conversation

@dominik1001

Copy link
Copy Markdown
Owner

Summary

The first release on main failed with ENONPMTOKEN — expected, since npm trusted publishing can only be configured on a package that already exists on the registry, and carddav-mcp hasn't been published yet.

This wires NPM_TOKEN: ${{ secrets.NPM_TOKEN }} into the semantic-release step so the initial 0.1.0 publish can authenticate with a token.

To release 0.1.0 after merging

  1. Create a granular npm access token allowed to publish (including creating new packages).
  2. Add it as the NPM_TOKEN repository secret.
  3. Re-run the release job on main (or land any commit).

The v0.0.0 baseline 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_TOKEN secret, drop the env line, and add an npm install -g npm@latest step (OIDC publishing needs npm ≥ 11.5.1).

🤖 Generated with Claude Code

https://claude.ai/code/session_01WJjmg9LMuvaNqbTAXQahgU


Generated by Claude Code

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
@dominik1001

Copy link
Copy Markdown
Owner Author

We published manually once, and from now on trusted publishing.

@dominik1001 dominik1001 closed this Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants