How to install/publish packages from multiple `@scope` and multiple registers?
See original GitHub issueHow to install packages from multiple @scope
and multiple registers?
I have settings .npmrc
in the root of the project:
@scope1:registry=https://npm.pkg.github.com
@scope2:registry=https://npm.pkg.github.com
@scope3:registry=https://npm.anysite.org
@scope4:registry=https://registry.npmjs.org
and npmjs.com
by default for a public
I need to create something like this settings .npmrc
in the home folder before installing:
//npm.pkg.github.com/:_authToken=<TOKEN_A>
//nnpm.anysite.org/:_authToken=<TOKEN_B>
//registry.npmjs.org/@scope4/:_authToken=<TOKEN_C>
or
//npm.pkg.github.com/@scope1/:_authToken=<TOKEN_A1>
//npm.pkg.github.com/@scope2/:_authToken=<TOKEN_A2>
//nnpm.anysite.org/:_authToken=<TOKEN_B>
//registry.npmjs.org/@scope4/:_authToken=<TOKEN_C>
Issue Analytics
- State:
- Created 4 years ago
- Reactions:23
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Publishing npm packages to multiple registries with Github ...
The scope lets you group the packages (e.g. @OWNER/PACKAGE ), it is required for every published package at GPR, while it is optional...
Read more >Creating and publishing scoped public packages - npm Docs
To share your code publicly in a user or organization namespace, you can publish public user-scoped or organization-scoped packages to the npm registry....
Read more >Is there any way to configure multiple registries in a single ...
Publish your private npm packages to the local repo. Users now can run a one time setup. npm config set registry https://nexus/content/groups/GROUP.
Read more >Ubuntu Manpage: npm-scope - Scoped packages
(As of 2015-04-19, the public npm registry does support scoped packages) If you wish, you may associate a scope with a registry; see...
Read more >Publishing Your First NPM Package into GitHub Packages
GitHub Packages is a registry to publish and share many package ... so we can't publish multiple package scopes using the same organization....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
given this: #49, #52, #53, #64. a the optimal solution would be something like this:
where,
npm-registry
- written in.npmrc
in the home folder, and is used for all subsequent commandsGITHUB_TOKEN
- access the current organizationGITHUB_TOKEN_THIRD_PARTY
- may be aPersonal access tokens
. Or aOrganization access tokens
. Yeah, that’s really missing on GitHub, but this would be crucial for using third-party packages from a security perspectiveWe have a file called
.npmrc_ci
and then replace the environment variable in the action run..npmrc_ci
:This is the workflow step which replaces the variable:
I dont think there is an easy fix for that issue. As far as I know its not possible to provide lists as action input variables (only single value/key), see https://github.com/actions/toolkit/issues/184. So you probably end up with some separator which doesnt look nice.