Skip to content

Fix publish workflow failure caused by runtime npm upgrade#11

Merged
hustcc merged 3 commits into
masterfrom
copilot/fix-publish-job-failure
Jul 9, 2026
Merged

Fix publish workflow failure caused by runtime npm upgrade#11
hustcc merged 3 commits into
masterfrom
copilot/fix-publish-job-failure

Conversation

Copilot AI commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

The publish GitHub Actions job fails during npm publish with Cannot find module 'sigstore'. The failure is introduced by upgrading npm at runtime in the workflow before publishing.

  • Root cause addressed

    • Removed runtime npm self-upgrade from the publish workflow (npm install -g npm@latest), which was destabilizing npm’s publish/provenance path on the runner.
  • Workflow behavior after change

    • Keep Node setup via actions/setup-node@v4 (Node 24).
    • Publish using the runner-provided npm from setup-node, preserving OIDC trusted publishing flow:
      • npm publish --access public
  • Files changed

    • .github/workflows/publish.yml
# removed
- name: Update npm
  run: npm install -g npm@latest

# unchanged publish path
- name: Publish to npm
  run: npm publish --access public

@hustcc hustcc marked this pull request as ready for review July 9, 2026 10:52
@hustcc hustcc merged commit c792560 into master Jul 9, 2026
2 checks passed
@hustcc hustcc deleted the copilot/fix-publish-job-failure branch July 9, 2026 10:52
Copilot AI changed the title [WIP] Fix the failing GitHub Actions job 'publish' Fix publish workflow failure caused by runtime npm upgrade Jul 9, 2026
Copilot stopped work on behalf of hustcc due to an error July 9, 2026 10:52
Copilot AI requested a review from hustcc July 9, 2026 10:52
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