Skip to content

Commit 1dfad50

Browse files
committed
fix(release): fix releasing npm packages with workspace deps
1 parent 8451040 commit 1dfad50

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

scripts/release/sdk.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,13 @@ export async function publishSdk(opts: ReleaseOpts) {
6161

6262
// Publish
6363
console.log(`==> Publishing to NPM: ${name}@${opts.version}`);
64-
await $({ cwd: path })`pnpm install`;
64+
65+
// Add --tag flag for release candidates
66+
const isReleaseCandidate = opts.version.includes("-rc.");
67+
const tag = isReleaseCandidate ? "rc" : "latest";
68+
6569
await $({
66-
cwd: path,
67-
})`pnpm npm publish --access public --tolerate-republish`;
70+
stdio: "inherit",
71+
})`pnpm --filter ${name} publish --access public --tag ${tag}`;
6872
}
6973
}

0 commit comments

Comments
 (0)