Skip to content

Pin npm publish workflows to npm 11 to unblock release jobs#2952

Merged
rebeccahum merged 3 commits into
trunkfrom
copilot/fix-publish-to-npm
Jul 10, 2026
Merged

Pin npm publish workflows to npm 11 to unblock release jobs#2952
rebeccahum merged 3 commits into
trunkfrom
copilot/fix-publish-to-npm

Conversation

Copilot AI commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Publish to npm started failing in release PRs because the publish action upgrades npm to latest, which now resolves to npm 12; npm 12 rejects this repository’s npm-shrinkwrap.json during npm ci.
This PR constrains npm resolution in publish paths so release jobs continue using a compatible npm major.

  • Root cause

    • Automattic/vip-actions/npm-publish and npm-publish-prerelease run npm install -g npm.
    • On runners, that now installs npm 12, and npm ci --ignore-scripts fails against npm-shrinkwrap.json.
  • Workflow changes

    • Updated .github/workflows/npm-publish.yml to set NPM_CONFIG_TAG: next-11 for:
      • publish job (npm-publish action)
      • publish-prerelease job (npm-publish-prerelease action)
    • Added inline comments documenting the npm 12 + shrinkwrap incompatibility to prevent accidental regression.
  • Why this shape

    • Keeps the existing shared vip-actions version unchanged.
    • Applies the smallest repo-local control to both release and prerelease publishing flows.
- uses: Automattic/vip-actions/npm-publish@c8022b66e78461df4f802b935dc0dbb8399f96bc
  env:
    # npm@12 no longer supports npm-shrinkwrap.json with npm ci in this repository.
    NPM_CONFIG_TAG: next-11

@sonarqubecloud

Copy link
Copy Markdown

Copilot AI changed the title [WIP] Fix failing GitHub Actions job 'Publish to npm' Pin npm publish workflows to npm 11 to unblock release jobs Jul 10, 2026
Copilot AI requested a review from rinatkhaziev July 10, 2026 17:17
@rebeccahum rebeccahum marked this pull request as ready for review July 10, 2026 17:59
@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@rebeccahum rebeccahum merged commit 07103c6 into trunk Jul 10, 2026
19 of 20 checks passed
@rebeccahum rebeccahum deleted the copilot/fix-publish-to-npm branch July 10, 2026 18:12
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.

3 participants