Skip to content

Commit 21b5566

Browse files
committed
chore(ci): debug bundle release script
1 parent 9f745f8 commit 21b5566

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

scripts/bundle-release.cjs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,15 @@ module.exports = async function({ github, workspace, publishedPackages }) {
1717
// get the tag for the release for this package
1818
const tag = `${packageName}@${version}`;
1919

20-
const { id } = await github.rest.repos.getReleaseByTag({ owner, repo, tag });
20+
// const release = await github.rest.repos.getReleaseByTag({ owner, repo, tag });
21+
const release =
22+
await github.request(`GET /repos/{owner}/{repo}/releases/tags/{tag}`, { owner, repo, tag });
2123

22-
const params = { owner, release_id: id, repo };
24+
if (!release.id) {
25+
throw new Error(`Could not find release for tag: ${tag}`);
26+
}
27+
28+
const params = { owner, release_id: release.id, repo };
2329

2430
// eslint-disable-next-line
2531
console.log({ tag, ...params });

0 commit comments

Comments
 (0)