Skip to content

Commit 1055a78

Browse files
committed
chore: try publish using otp
1 parent 0de51fd commit 1055a78

File tree

3 files changed

+90
-2
lines changed

3 files changed

+90
-2
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@
5757
},
5858
"dependencies": {
5959
"error-stack-parser": "^2.1.4",
60-
"html-entities": "^2.5.2"
60+
"html-entities": "^2.5.2",
61+
"@continuous-auth/client": "2.3.2"
6162
},
6263
"peerDependencies": {
6364
"react-refresh": ">=0.10.0 <1.0.0",

pnpm-lock.yaml

Lines changed: 82 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/release.mjs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import path from 'path';
22
import * as url from 'url';
3+
import { getOtp } from '@continuous-auth/client';
34
import { $ } from 'execa';
45
import fs from 'fs-extra';
56
import { inc } from 'semver';
@@ -38,8 +39,12 @@ fs.writeFileSync(
3839
// Publish to npm
3940
console.info(`Publishing to npm with tag ${RELEASE_TAG}`);
4041
const dryRun = RELEASE_DRY_RUN === 'true' ? ['--dry-run'] : [];
42+
console.log('Getting OTP code');
43+
let otp = await getOtp();
44+
console.log('OTP code get, continuing...');
45+
4146
try {
42-
await $`pnpm publish ${dryRun} --tag ${RELEASE_TAG} --no-git-checks --provenance`;
47+
await $`pnpm publish ${dryRun} --tag ${RELEASE_TAG} --otp ${otp} --no-git-checks --provenance`;
4348
console.info(`Published successfully`);
4449
} catch (e) {
4550
console.error(`Publish failed: ${e.message}`);

0 commit comments

Comments
 (0)