Publish package to multiple registries
See original GitHub issueIs your feature request related to a problem? Please describe. When I added ability to select package registry (npm or github #599), I realize that will be nice to support publishing to both of them.
But ShipJS cant do this 😔
Describe the solution you’d like
First solution that I figure out is add --publishOnly
flag to trigger command.
With that flag I can easily configurate github actions, will be like:
steps:
# clone repo and checkout master
- uses: actions/checkout@master
with:
ref: master
# setup node and npm with npmjs registry
- uses: actions/setup-node@master
with:
registry-url: "https://registry.npmjs.org"
# install shipjs and other dependencies
- run: |
if [ -f "yarn.lock" ]; then
yarn install
else
npm install
fi
# trigger first release with all stuff
- run: npm run release:trigger
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
SLACK_INCOMING_HOOK: ${{ secrets.SLACK_INCOMING_HOOK }}
# setup node and npm with github registry
- uses: actions/setup-node@master
with:
registry-url: "https://npm.pkg.github.com"
# trigger second release that only publish package to registry
- run: npm run release:trigger -- --publishOnly
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Describe alternatives you’ve considered I don’t know any alternatives. @eunjae-lee what do you think about that? May be you offer better solution for this case.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Publishing npm packages to multiple registries with Github ...
This blog post covers what you need to know in order to automate publishing an npm package to Npm and Github package registries....
Read more >How to publish on two different registry · Issue #69 - GitHub
The package.json and .npmrc are used by npm to define the registry used by your project and they allow to define only one....
Read more >npm-multi-publish
Publish an npm package to multiple registries. ... Start using npm-multi-publish in your project by running `npm i npm-multi-publish`.
Read more >Is there any way to configure multiple registries in a single ...
No, NPM does not support multiple registry except for scoped one. Refer to: https://docs.npmjs ...
Read more >Work with Multiple npm Registries | by Allen Kim - Medium
This article shows how to work with multiple registries for different projects. 1. Setup a user-wide registry and credentials.
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
Hi @jeetiss ,
I’m not sure about this and the related PR #599. When we get enough of request, we can bake this in the
setup
command then. For now, I will close this issue and the PR.Feel free to open them again if you want to continue to discuss on this 🙂
@jeetiss oh actually I meant
yarn publish
.In my head, this will likely work:
If that is possible, I guess we can just document this and leave it to users.