You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't publish the repository via Github action
This is the repository.
I generated npm token for automation by following the npm documentation then I set the repository secret NPM_TOKEN
This my config:
Run npx semantic-release
npx: installed 751 in 14.131s
[1:25:02 AM] [semantic-release] › ℹ Running semantic-release version 17.2.2
[1:25:02 AM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/changelog"
[1:25:02 AM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/npm"
[1:25:02 AM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/git"
[1:25:02 AM] [semantic-release] › ✔ Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
[1:25:02 AM] [semantic-release] › ✔ Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator"
[1:25:02 AM] [semantic-release] › ✔ Loaded plugin "prepare" from "@semantic-release/changelog"
[1:25:02 AM] [semantic-release] › ✔ Loaded plugin "prepare" from "@semantic-release/npm"
[1:25:02 AM] [semantic-release] › ✔ Loaded plugin "prepare" from "@semantic-release/git"
[1:25:02 AM] [semantic-release] › ✔ Loaded plugin "publish" from "@semantic-release/npm"
[1:25:02 AM] [semantic-release] › ✔ Loaded plugin "addChannel" from "@semantic-release/npm"
[1:25:03 AM] [semantic-release] › ✔ Run automated release from branch main on repository https://github.com/hamzahamidi/playground-npm.git
[1:25:03 AM] [semantic-release] › ✔ Allowed to push to the Git repository
[1:25:03 AM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/changelog"
[1:25:03 AM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/changelog"
[1:25:03 AM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/npm"
[1:25:03 AM] [semantic-release] [@semantic-release/npm] › ℹ Verify authentication for registry https://registry.npmjs.org/
[1:25:03 AM] [semantic-release] [@semantic-release/npm] › ℹ Wrote NPM_TOKEN to /tmp/a3cb85b51ec075d649e1a61aa09906d2/.npmrc
npm ERR! code E403
npm ERR! 403 403 Forbidden - GET https://registry.npmjs.org/-/whoami
npm ERR! 403 In most cases, you or one of your dependencies are requesting
npm ERR! 403 a package version that is forbidden by your security policy.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/2020-11-07T01_25_04_376Z-debug.log
[1:25:04 AM] [semantic-release] › ✖ Failed step "verifyConditions" of plugin "@semantic-release/npm"
[1:25:04 AM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/git"
[1:25:04 AM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/git"
[1:25:04 AM] [semantic-release] › ✖ EINVALIDNPMTOKEN Invalid npm token.
The npm token (https://github.com/semantic-release/npm/blob/master/README.md#npm-registry-authentication) configured in the NPM_TOKEN environment variable must be a valid token (https://docs.npmjs.com/getting-started/working_with_tokens) allowing to publish to the registry https://registry.npmjs.org/.
If you are using Two-Factor Authentication, make configure the auth-only level (https://docs.npmjs.com/getting-started/using-two-factor-authentication#levels-of-authentication) is supported. semantic-release cannot publish with the default auth-and-writes level.
Please make sure to set the NPM_TOKEN environment variable in your CI with the exact value of the npm token.
AggregateError:
SemanticReleaseError: Invalid npm token.
at module.exports (/home/runner/.npm/_npx/2618/lib/node_modules/semantic-release/node_modules/@semantic-release/npm/lib/get-error.js:6:10)
at module.exports (/home/runner/.npm/_npx/2618/lib/node_modules/semantic-release/node_modules/@semantic-release/npm/lib/verify-auth.js:26:33)
at /home/runner/.npm/_npx/2618/lib/node_modules/semantic-release/lib/plugins/pipeline.js:54:11
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async Object.pluginsConf.<computed> [as verifyConditions] (/home/runner/.npm/_npx/2618/lib/node_modules/semantic-release/lib/plugins/index.js:80:11)
at async run (/home/runner/.npm/_npx/2618/lib/node_modules/semantic-release/index.js:95:3)
at async module.exports (/home/runner/.npm/_npx/2618/lib/node_modules/semantic-release/index.js:260:22)
at async module.exports (/home/runner/.npm/_npx/2618/lib/node_modules/semantic-release/cli.js:55:5)
Error: Process completed with exit code 1.
The text was updated successfully, but these errors were encountered:
hamzahamidi
changed the title
Failed step "verifyConditions" of plugin "@semantic-release/npm"
[npm ERR! 403 403 Forbidden]: Failed step "verifyConditions" of plugin "@semantic-release/npm"
Nov 7, 2020
hamzahamidi
changed the title
[npm ERR! 403 403 Forbidden]: Failed step "verifyConditions" of plugin "@semantic-release/npm"
[npm ERR! 403 Forbidden]: Failed step "verifyConditions" of plugin "@semantic-release/npm"
Nov 7, 2020
Current behavior
I can't publish the repository via Github action
This is the repository.
I generated npm token for automation by following the npm documentation then I set the repository secret NPM_TOKEN
This my config:
Expected behavior
Environment
.releaserc.json
Link to CI logs
The text was updated successfully, but these errors were encountered: