From 705e89e875f73d6de8083c99802beac0ea3df4f0 Mon Sep 17 00:00:00 2001 From: ycjcl868 <45808948@qq.com> Date: Tue, 23 Feb 2021 18:08:27 +0800 Subject: [PATCH] chore: otp --- scripts/release.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/release.js b/scripts/release.js index 46d94c76acb4..8b510575c344 100644 --- a/scripts/release.js +++ b/scripts/release.js @@ -145,7 +145,11 @@ async function release() { isNext ? 'with next tag' : '' }`, ); - const cliArgs = isNext ? ['publish', '--tag', 'next'] : ['publish']; + let cliArgs = isNext ? ['publish', '--tag', 'next'] : ['publish']; + // one-time password from your authenticator + if (args.otp) { + cliArgs = cliArgs.concat(['--otp', args.otp]); + } const { stdout } = execa.sync('npm', cliArgs, { cwd: pkgPath, });