Skip to content

release.yml: the npm publish job installs the npm CLI next to the OIDC credential #5104

Description

@cliffhall

Problem

release.yml's publish-npm job, which holds id-token: write and the release environment, runs npm install -g --ignore-scripts npm@11.20.0, because OIDC trusted publishing needs npm >= 11.5.1 and Node 22 bundles npm 10.x. The install is pinned and runs no lifecycle scripts, but the downloaded npm CLI is then executed next to the publish credential, and it breaks the rule in AGENTS.md (Credentialed workflow jobs) that a job holding a publish credential installs nothing.

Raised by Copilot on the v1.0.0 merge PR #5090 (thread r4237133436). Present on main (looser: npm@^11.5.1), v2/main and v2/release/1.0.0.

Expected

The publish job gets an npm that meets the OIDC floor without installing one: actions/setup-node (SHA-pinned) with an exactly pinned Node 24 release, whose bundled npm is >= 11.5.1 (Node 24.21.0 bundles npm 11.19.0), and no npm install step. A step fails the job before publishing if the bundled npm is below 11.5.1. The build jobs keep Node 22.

Activity

  1. added this to the v2.0.0 milestone on Oct 10, 2026
  2. added
    choreMaintenance: deps, build tooling, CI, cleanup — no user-facing behavior change
    on Oct 10, 2026
  3. self-assigned this
    on Oct 10, 2026
  4. added a commit that references this issue on Oct 10, 2026
  5. cliffhall commented on Oct 10, 2026

    @cliffhall
    MemberAuthor

    Fixed on v2/main by #5105 and on the release branch v2/release/1.0.0 by #5106 (v1.0.0 publishes this way).

  6. added a commit that references this issue on Oct 11, 2026
    0a174e9
  7. added a commit that references this issue on Oct 12, 2026
    b4d3a6f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

choreMaintenance: deps, build tooling, CI, cleanup — no user-facing behavior changev2

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions