Skip to content

Introduce the useOidc option in reassignNpmTags() - #1496

Merged
pomek merged 2 commits into
masterfrom
ci/4658-reassign-npm-tags-oidc
Oct 1, 2026
Merged

pomek merged 2 commits into
masterfrom
ci/4658-reassign-npm-tags-oidc

Conversation

@pomek

@pomek pomek commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

🚀 Summary

Introduces the useOidc option in the reassignNpmTags() task, the same way as in publishPackages().

Until now, reassignNpmTags() always checked the npm account with npm whoami. With npm Trusted Publishing (OIDC), npm whoami does not reflect the OIDC authentication, so the task failed before any npm dist-tag add call. When useOidc is enabled, the task verifies that the NPM_ID_TOKEN environment variable is set instead. The npmOwner option is then not required.

The OIDC check now lives in assertNpmAuthorization( npmOwner, { useOidc } ), so publishPackages() and reassignNpmTags() only pass the option. Before, publishPackages() had its own copy of the check. The error message is now the same for both tasks: The "NPM_ID_TOKEN" environment variable is required when using npm Trusted Publishing (OIDC).

Changing dist-tags with OIDC requires npm 11.21.0 or newer (npm/cli#10038) and a trusted publisher that allows npm dist-tag. This was verified on CircleCI in ckeditor/ckeditor5-commercial#11957.


📌 Related issues


💡 Additional information

A backport for the master-v54 line (used by ckeditor5-commercial#release-v47) is in a separate PR.

The default behavior does not change. Without useOidc, the task still calls npm whoami.

@pomek
pomek requested a review from a team as a code owner October 1, 2026 05:51
@pomek
pomek merged commit d3f5864 into master Oct 1, 2026
8 checks passed
@pomek
pomek deleted the ci/4658-reassign-npm-tags-oidc branch October 1, 2026 06:45
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