Skip to content

ci: let the first npm release publish with an NPM_TOKEN secret - #3

Merged
iyashjayesh merged 1 commit into
mainfrom
ci/npm-token-fallback
Oct 17, 2026
Merged

iyashjayesh merged 1 commit into
mainfrom
ci/npm-token-fallback

Conversation

@iyashjayesh

Copy link
Copy Markdown
Collaborator

npm only lets a trusted publisher be attached to a package that already exists, and a manual first publish from the CLI needs an interactive 2FA prompt. So the first release publishes from CI with an NPM_TOKEN secret (a 7-day granular token limited to the @flamai scope).

  • When NPM_TOKEN is set, the release job publishes with it.
  • Otherwise it uses Trusted Publishing (OIDC) as before.

After @flamai/finesse@0.1.1 is published: add the trusted publisher on npmjs.com, delete the NPM_TOKEN secret and revoke the token.

npm only lets a trusted publisher be attached to an existing package, so the first release needs
a token. When the NPM_TOKEN secret is set the release publishes with it; otherwise it uses
Trusted Publishing as before.
@iyashjayesh
iyashjayesh merged commit ec43242 into main Oct 17, 2026
3 checks passed
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.

1 participant