fix: remove NPM_CONFIG_PROVENANCE and set explicit NODE_AUTH_TOKEN in Release workflow#177
Draft
sandornagy517 with Copilot wants to merge 2 commits into
Draft
fix: remove NPM_CONFIG_PROVENANCE and set explicit NODE_AUTH_TOKEN in Release workflow#177sandornagy517 with Copilot wants to merge 2 commits into
sandornagy517 with Copilot wants to merge 2 commits into
Conversation
Copilot
AI
changed the title
[WIP] Fix failing GitHub Actions job Release
fix: remove NPM_CONFIG_PROVENANCE and set explicit NODE_AUTH_TOKEN in Release workflow
Jul 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The Release CI job began failing with HTTP 404 on all
npm publishPUT requests after GitHub Actions silently switched to Node.js 24 as the runner default on June 2, 2026. The workflow YAML was identical between the last successful run (May 15) and the failing run (July 3).Two root causes identified:
NPM_CONFIG_PROVENANCE: truetriggers npm's OIDC-based attestation flow during publish. The npm registry's attestation endpoint (/_/api/v1/attestations/{pkg}/{version}) began returning 404, blocking all publishes. Provenance was already identified as problematic in a prior fix attempt (commit "Fix release script to remove provenance flag").NODE_AUTH_TOKENset toGITHUB_TOKENbyactions/setup-node@v4(a side effect of specifyingregistry-url). The.npmrcatNPM_CONFIG_USERCONFIGuses_authToken=${NODE_AUTH_TOKEN}, so any subprocess reading it authenticates with the GitHub token instead of the npm token — npm returns 404 (not 401) as a security measure.Changes to
.github/workflows/on_push_to_main.yml:NPM_CONFIG_PROVENANCE: truefrom the "Publish to NPMJS" step env — eliminates the attestation API call entirelyNODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}— overrides theGITHUB_TOKENset bysetup-node@v4so both Yarn's own auth config and the.npmrcfallback use the correct npm token- name: Publish to NPMJS ... env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_CONFIG_PROVENANCE: true + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}Issue number: N/A (CI infrastructure fix)
Affected plugin
Type of change
Checklist
If this is a breaking change 👇
Acknowledgement
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.