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:
Runner type:
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
| 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; |
| } |
| }); |
previous one should have been ignored, or at least it should have been overwritten later at
| 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.
Description:
I'm publishing a package to both GPR and npm, in that order. Execution of
setup-nodeworks well, but publishing to npm fails because it's still trying to do it to GPR.Action version:
v3
Platform:
Runner type:
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-nodewith defaultregistry-url, andnpm ciworks ok.Use again
setup-nodewith GPRregistry-url, publish works ok.Use again
setup-nodewith npmregistry-url, publish fails because it's still using GPR registry. I've reviewed the code, and bysetup-node/src/authutil.ts
Lines 39 to 44 in 869f4dd
setup-node/src/authutil.ts
Line 51 in 869f4dd
Expected behavior:
Second call to
setup-nodedefiningregistry-urlshould update it for all the next commands.Actual behavior:
Once
registry-urlis set, it's being preserved for all the next commands.