-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Description:
I'm publishing a package to both GPR and npm, in that order. Execution of setup-node
works well, but publishing to npm fails because it's still trying to do it to GPR.
Action version:
v3
Platform:
- Ubuntu
- macOS
- Windows
Runner type:
- Hosted
- Self-hosted
Tools version:
Default ones.
node: v18.16.0
npm: 9.5.1
Repro steps:
Workflow available at https://github.com/Mafalda-SFU/mediasoup/actions/runs/5129548473/jobs/9227484918
Use setup-node
with default registry-url
, and npm ci
works ok.
Use again setup-node
with GPR registry-url
, publish works ok.
Use again setup-node
with npm registry-url
, publish fails because it's still using GPR registry. I've reviewed the code, and by
Lines 39 to 44 in 869f4dd
curContents.split(os.EOL).forEach((line: string) => { | |
// Add current contents unless they are setting the registry | |
if (!line.toLowerCase().startsWith(`${scope}registry`)) { | |
newContents += line + os.EOL; | |
} | |
}); |
Line 51 in 869f4dd
newContents += `${authString}${os.EOL}${registryString}${os.EOL}${alwaysAuthString}`; |
Expected behavior:
Second call to setup-node
defining registry-url
should update it for all the next commands.
Actual behavior:
Once registry-url
is set, it's being preserved for all the next commands.