Skip to content

Commit 7d7027d

Browse files
jrolfsclaude
andcommitted
fix(fork): own tags + releases instead of feeding changesets/action
changesets/action scans the publish command's stdout for "New tag:" lines and requires each name to resolve to a workspace package. Our rescoped names (@jrolfs/pascal-*) never match the workspace (source stays @pascal-app/*), so the action threw "Package not found" and failed the job — even though the packages had already published and tagged successfully. Stop printing "New tag:" lines and create the GitHub Releases directly in publish-fork.ts (alongside the git tags we already push), named after what was actually published. Best-effort so re-runs don't fail. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 5b3774e commit 7d7027d

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

scripts/publish-fork.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,21 @@ for (const dir of readdirSync("packages")) {
8989
console.log(`→ Publishing ${tag}`);
9090
await $`npm publish ${packed} --ignore-scripts --registry ${REGISTRY}`;
9191
newTags.push(tag);
92-
console.log(`New tag: ${tag}`); // changesets/action parses this for the GitHub Release
9392
} finally {
9493
rmSync(work, { recursive: true, force: true });
9594
}
9695
}
9796

98-
// Tag the published versions under the fork scope so GitHub Releases attach to
99-
// real refs named after what was actually published (not the @pascal-app source).
97+
// Tag and release under the fork scope. We do NOT print changesets' "New tag:"
98+
// lines and let changesets/action create the releases: the action matches each
99+
// printed name against a workspace package, which never matches our rescoped
100+
// names (the source stays @pascal-app/*), so it errors. Instead we own the tag
101+
// + release here, named after what was actually published. Best-effort so a
102+
// re-run (tag/release already exists) doesn't fail the job.
100103
if (IN_CI && newTags.length > 0) {
101104
for (const tag of newTags) await $`git tag ${tag}`.nothrow();
102105
await $`git push origin ${newTags}`.nothrow();
106+
for (const tag of newTags) {
107+
await $`gh release create ${tag} --title ${tag} --notes ${"Published to GitHub Packages."}`.nothrow();
108+
}
103109
}

0 commit comments

Comments
 (0)