release-it-plugins / workspaces

A release-it plugin for publishing projects with workspaces
MIT License
62 stars 14 forks source link

Plugin requires npm login, even if npm publish disabled #66

Open alextompkins opened 2 years ago

alextompkins commented 2 years ago

It looks like this plugin somehow causes release-it to require npm login, even if the npm publish step is disabled. My release-it.json looks like the following:

{
  "git": {
    "requireBranch": "main",
    "tagName": "v${version}"
  },
  "github": {
    "release": true,
    "web": true
  },
  "npm": {
    "publish": false
  },
  "plugins": {
    "release-it-yarn-workspaces": true
  }
}

And my root package.json includes the two packages I have under a subdirectory:

  "workspaces": [
    "packages/*"
  ]

When I run release-it with this configuration, it asks me to authenticate, even though I'm not publishing to NPM. image

alextompkins commented 2 years ago

Apologies, I see now that the skipChecks option provides me the ability to avoid this 💯

However, it seems to me like this should be the default, as release-it by default doesn't require you to be authenticated if NPM publishing is disabled.

MGough commented 2 years ago

We encountered this issue too having adopted release-it-yarn-workspaces in addition to a release-it config we've been running for ~6 months now. It's particularly tricky as it only presented itself in CI, whereas running locally did not encounter this issue, we weren't expecting this failure as we'd set NPM publish to false at both levels:

    "release-it-yarn-workspaces": {
      "publish": false,
      ...
    }