async defaultInvokePublish(pkgs) {
    const { dryRun, root: cwd } = this.opts
    const { spawn, console } = this.caps

    await new Promise((resolve, reject) => {
      const args = ['publish', ...pkgs.map((name) => `--workspace=${name}`)]
      if (dryRun) {
        args.push('--dry-run')
      }

      const relativeCwd = this.relPath(cwd)
      console.error(
        `${INFO} Running command in ${relativeCwd}:\nnpm ${args.join(' ')}`
      )

      spawn('npm', args, { ...DEFAULT_SPAWN_OPTS, cwd })
        .once('error', reject)
        .once('exit', (code) => {
          if (code === 0) {
            resolve(void 0)
          } else {
            reject(new Error(`npm publish exited with code ${code}`))
          }
        })
    })
  }
Invoke `npm publish`

@type {import('./types').InvokePublish}