Skip to content

Commit 7ff7261

Browse files
committed
fix: create root release tags for staged publish
1 parent 11822fc commit 7ff7261

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

.github/scripts/stage-packages.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const root = process.cwd();
77
const config = JSON.parse(readFileSync(join(root, ".changeset/config.json"), "utf8"));
88
const ignored = new Set(config.ignore || []);
99
const access = config.access || "public";
10+
const isWorkspaceRelease = existsSync(join(root, "pnpm-workspace.yaml"));
1011

1112
function readJson(path) {
1213
return JSON.parse(readFileSync(path, "utf8"));
@@ -138,7 +139,7 @@ for (const packageJsonPath of packageJsonPaths()) {
138139
if (result.status !== 0) process.exit(result.status || 1);
139140

140141
const stageId = result.stdout.match(/"stageId"\s*:\s*"([^"]+)"/)?.[1];
141-
const tagName = `${pkg.name}@${pkg.version}`;
142+
const tagName = isWorkspaceRelease ? `${pkg.name}@${pkg.version}` : `v${pkg.version}`;
142143
createGitTag(tagName);
143144

144145
staged.push({

0 commit comments

Comments
 (0)