Skip to content

fix(release): publish to npm with trusted publishing (backport #2874) - #2876

Queued
aws-cdk-automation wants to merge 1 commit into
maintenance/v5.9from
backport/maintenance/v5.9-pr-2874
Queued

aws-cdk-automation wants to merge 1 commit into
maintenance/v5.9from
backport/maintenance/v5.9-pr-2874

Conversation

@aws-cdk-automation

Copy link
Copy Markdown
Collaborator

Backport

This will backport the following commits from main to maintenance/v5.9:

Questions ?

Please refer to the Backport tool documentation

Releases switched back to npm tokens because npm only allowed one
trusted publisher config per package (#2662). npm now supports multiple
configs, so the release job authenticates via OIDC again for both `npm
publish` and `npm dist-tag`, and no longer fetches the npm token.
Consumers using pnpm's `--trust-policy no-downgrade` currently reject
new versions because earlier ones were trusted-published.

`npm dist-tag` with OIDC needs npm 11.21.0 or later, but Node LTS ships
11.20.0, so the job now updates npm before publishing.

The npm trusted publisher config for `release.yml`, with "Allow npm
dist-tag" enabled, must be in place before this ships. Labelled for
backport to `maintenance/v5.9` and `preview/v7.1` so all active release
lines publish the same way.

Fixes #2662

---

By submitting this pull request, I confirm that my contribution is made
under the terms of the [Apache 2.0 license].

[Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0

(cherry picked from commit c08fc64)
@aws-cdk-automation
aws-cdk-automation added this pull request to the merge queue Nov 12, 2026
Any commits made after this event will not be merged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-approve Automatically approve this PR backport

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants