Skip to content

Commit db0c697

Browse files
committed
build: Update release script for manual publish
I can't figure out how to get the otp to work here
1 parent 3fa6b8a commit db0c697

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

scripts/release.ts

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,14 +114,22 @@ A token can be created at:
114114
}
115115

116116
const releaseNotes = await getReleaseNotes(version);
117+
const { confirmed } = await inquirer.prompt<{ confirmed: boolean }>([
118+
{
119+
type: "confirm",
120+
name: "confirmed",
121+
message: `Open the authenticator app to get a one-time password and run the following command:
117122
118-
const { opt } = await inquirer.prompt<{ opt: string }>({
119-
type: "input",
120-
name: "opt",
121-
message: "One Time Password (required to publish to npm)",
122-
});
123+
npm publish --otp
124+
`,
125+
},
126+
]);
127+
if (!confirmed) {
128+
console.error("Canceling the release.");
129+
undo(version);
123130

124-
loggedCommand(`npm publish --otp ${opt}`);
131+
process.exit(1);
132+
}
125133
loggedCommand("git push --follow-tags origin main");
126134
const octokit = new Octokit({ auth: GITHUB_TOKEN });
127135
const response = await octokit.request(

0 commit comments

Comments
 (0)