Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upfix(trigger): replace yarn publish with npm publish #919
Conversation
you could set the registry in the yarnrc too, although I'm not sure how that works when shipjs is in node_modules |
@Haroenv didn't see you comment here. You're right. That env var didn't work and now I'm trying again with |
This PR replaces
yarn publish
withnpm publish
even if user is usingyarn
.yarn publish
usesyarn pack
under the hood, and there is a critical bug inyarn pack
.Replacing
yarn publish
withnpm publish
requires an extra job, which is to setregistry
to the one of npm. Even though Ship.js callsnpm publish
, if it's triggered byyarn shipjs trigger
, then yarn overrides the registry. It's coming from~/.yarnrc
. To revert this back, we need to prependnpm_config_registry=https://registry.npmjs.org/
to set the registry correctly.