adds output for tag created

This commit is contained in:
Emmaline Autumn 2025-05-06 23:24:36 -06:00
parent 8bd828ee96
commit 817ea1715b

View File

@ -29,13 +29,21 @@ if (branch.startsWith("prerelease-")) {
}
const tag = `v${version}`;
let created = true;
try {
await run("git", ["rev-parse", tag]);
console.log(`Tag ${tag} already exists.`);
created = false;
} catch {
await run("git", ["tag", tag]);
await run("git", ["push", "origin", tag]);
}
if (created) {
console.log(`::set-output name=tag_created::true`);
console.log(`::set-output name=tag_name::${tag}`);
} else {
console.log(`::set-output name=tag_created::false`);
}
async function run(cmd: string, args: string[]) {
const command = new Deno.Command(cmd, {