File tree 1 file changed +14
-6
lines changed
1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -114,14 +114,22 @@ A token can be created at:
114
114
}
115
115
116
116
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:
117
122
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 ) ;
123
130
124
- loggedCommand ( `npm publish --otp ${ opt } ` ) ;
131
+ process . exit ( 1 ) ;
132
+ }
125
133
loggedCommand ( "git push --follow-tags origin main" ) ;
126
134
const octokit = new Octokit ( { auth : GITHUB_TOKEN } ) ;
127
135
const response = await octokit . request (
You can’t perform that action at this time.
0 commit comments