Skip to content

Commit

Permalink
chore: refactor release script
Browse files Browse the repository at this point in the history
  • Loading branch information
tanishqmanuja committed Oct 17, 2024
1 parent 88f76d7 commit a89bc17
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions scripts/release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,17 @@ if(bump === "major" || bump === "minor" || bump === "patch") {
console.log(`Bump Type: ${bump}`);
console.log(`Repo: ${owner}/${repo}`);

console.log("\nDispatching workflow...\n");
console.log("\nDispatching workflow...");

await $`gh api --method POST -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" \
/repos/${owner}/${repo}/actions/workflows/${WORKFLOW_ID}/dispatches -f "ref=main" -f "inputs[bump]=${bump}"`;
/repos/${owner}/${repo}/actions/workflows/${WORKFLOW_ID}/dispatches -f "ref=main" -f "inputs[bump]=${bump}"`.quiet().then(() => {
console.log("Dispatched!");
process.exit(0);
}).catch(e => {
console.log(e);
process.exit(1);
})

process.exit(0);
} else {
console.log("Invalid bump type");
process.exit(1);
Expand Down

0 comments on commit a89bc17

Please sign in to comment.