Commit 6066de2
fix(ci): pass expanded auth token to Yarn's npmrc for GitHub Packages
actions/setup-node writes `${NODE_AUTH_TOKEN}` as a literal placeholder into
the temp npmrc it creates (NPM_CONFIG_USERCONFIG). npm expands env-var
references from .npmrc; Yarn classic does NOT. Yarn therefore sent the
string '${NODE_AUTH_TOKEN}' as the Bearer token → 401 on npm.pkg.github.com.
Fix: before `yarn install`, append the bash-expanded token to the file
that NPM_CONFIG_USERCONFIG points to. The previous attempt wrote to
~/.npmrc instead, which Yarn never reads when NPM_CONFIG_USERCONFIG is set.
Co-authored-by: GitHub Copilot <copilot@noreply.github.com>1 parent 84d92a3 commit 6066de2
1 file changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
26 | 35 | | |
27 | 36 | | |
28 | 37 | | |
29 | | - | |
30 | | - | |
31 | 38 | | |
32 | 39 | | |
33 | 40 | | |
| |||
0 commit comments