Skip to content

Commit

Permalink
Create release without Changelog if changelog does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
mayank1513 committed Jan 6, 2025
1 parent 6c2eb83 commit 14d1d38
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions scripts/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,13 @@ const provenance = visibility.toLowerCase() === "public" ? "--provenance" : "";
execSync(`cd lib && pnpm build && npm publish ${provenance} --access public`);

/** Create GitHub release */
execSync(
`gh release create ${VERSION} --generate-notes --latest -n "$(sed '1,/^## /d;/^## /,$d' CHANGELOG.md)" --title "Release v${VERSION}"`,
);
try {
execSync(
`gh release create ${VERSION} --generate-notes --latest -n "$(sed '1,/^## /d;/^## /,$d' CHANGELOG.md)" --title "Release v${VERSION}"`,
);
} catch {
execSync(`gh release create ${VERSION} --generate-notes --latest --title "Release v${VERSION}"`);
}

execSync("node ./scripts/lite.js");
execSync(`cd lib && pnpm build && npm publish ${provenance} --access public`);

0 comments on commit 14d1d38

Please sign in to comment.