Skip to content

fix(ci): scope npm auth to the fallback step, not the whole job - #258

Merged
michaeljymsgutierrez merged 1 commit into
mainfrom
fix/release-npm-auth-regression
Oct 10, 2026
Merged

michaeljymsgutierrez merged 1 commit into
mainfrom
fix/release-npm-auth-regression

Conversation

@michaeljymsgutierrez

Copy link
Copy Markdown
Owner

Description

Fixes a regression introduced by #257 (the git-notes fallback PR). That PR added registry-url: https://registry.npmjs.org to the Setup Node.js step so the new fallback step could authenticate npm via NODE_AUTH_TOKEN. In practice, actions/setup-node's registry-url input exports NPM_CONFIG_USERCONFIG for the rest of the job, pointing every subsequent npm command at an .npmrc that expects the token in NODE_AUTH_TOKEN - but the existing Release step only ever set NPM_TOKEN, which @semantic-release/npm had been reading directly and successfully before that change. This broke the main Release step's own npm authentication (observed as npm error 401 Unauthorized / EINVALIDNPMTOKEN on run 38070320562, 2026-10-10), well before it could even reach the known git-notes issue the fallback was built for. The Detect known git-notes push failure step correctly recognized this as a different failure and refused to run the fallback, so nothing was silently papered over - it just surfaced a real, separate bug.

Github Issue: None - found while testing #257's fallback with a real release run, not tracked by a filed issue.

Changes

  • .github/workflows/release.yml:
    • Removed registry-url: https://registry.npmjs.org from the Setup Node.js step, restoring the Release step's original, working npm authentication (direct NPM_TOKEN read by @semantic-release/npm).
    • The Fallback publish step's env var is renamed from NODE_AUTH_TOKEN back to NPM_TOKEN, and the step now runs npm config set //registry.npmjs.org/:_authToken "${NPM_TOKEN}" itself before publishing - scoping the auth configuration to just that one step instead of exporting it job-wide.

How Has This Been Tested?

  • New tests: none - this is a CI workflow change, not application code.
  • Test results: not applicable - a workflow_dispatch workflow isn't unit-testable.
  • Manual testing: the YAML was validated for schema correctness with npx @action-validator/cli (passed). The regression itself was confirmed via the actual failed run (38070320562) that exposed it. The fix has not been exercised by an actual workflow run - there is no way to verify it without actually triggering a release.

Checklist

  • Code follows the project's coding standards and best practices - YAML-only change, no application code touched.
  • Tests are written for new functionality and existing tests pass - not applicable to a workflow file.
  • Documentation is updated to reflect changes - N/A.
  • The PR is assigned to the correct reviewers.

Reviewer Guidance

  • Specific scenarios to test: this can only be confirmed by an actual release run. After merging, run gh workflow run release.yml. If Release fails on the known git-notes issue again, confirm the Fallback publish step runs and that npm publish succeeds this time (not another 401), and that the new version appears on the npm registry (npm view arm-js-library version) and as a GitHub release.
  • Expected behavior: the Release step's own npm authentication succeeds again (no 401 at the verifyConditions stage), and if it still fails later on the known git-notes issue, the fallback publish completes successfully.
  • What NOT to test: do not assume this is confirmed working just because the YAML parses correctly - it hasn't been exercised by a real run yet.
  • Reviewer notes: this is the second fix attempt for the same release workflow in two PRs (fix(ci): add fallback publish for semantic-release git-notes bug #257, then this one) - each prior attempt surfaced a new, previously-unseen failure once actually run. Treat the next release run's outcome as the real verification, not this diff alone.

@vercel

vercel Bot commented Oct 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
arm-js-library-demo Ready Ready Preview Oct 10, 2026 5:19pm UTC

@michaeljymsgutierrez
michaeljymsgutierrez marked this pull request as ready for review October 10, 2026 17:20
@michaeljymsgutierrez michaeljymsgutierrez self-assigned this Oct 10, 2026
@michaeljymsgutierrez
michaeljymsgutierrez merged commit 5d589e6 into main Oct 10, 2026
4 checks passed
@michaeljymsgutierrez
michaeljymsgutierrez deleted the fix/release-npm-auth-regression branch October 10, 2026 17:20
@michaeljymsgutierrez

Copy link
Copy Markdown
Owner Author

🎉 This PR is included in version 2.9.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@michaeljymsgutierrez michaeljymsgutierrez added released fix Bug fixes and patches labels Oct 10, 2026

This branch was successfully deployed

1 active deployment
Preview — 00e09918 Deployed Oct 10, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Bug fixes and patches released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant