output file i gues

This commit is contained in:
Emmaline Autumn 2025-05-06 23:36:55 -06:00
parent 817ea1715b
commit 4cbee1b340

View File

@ -39,10 +39,21 @@ try {
await run("git", ["push", "origin", tag]);
}
if (created) {
console.log(`::set-output name=tag_created::true`);
console.log(`::set-output name=tag_name::${tag}`);
const out = Deno.env.get("GITHUB_OUTPUT");
if (out) {
await Deno.writeTextFile(out, `tag_created=true\ntag_name=${tag}\n`, {
append: true,
});
} else {
console.log(`::set-output name=tag_created::false`);
console.error("GITHUB_OUTPUT not set.");
}
} else {
const out = Deno.env.get("GITHUB_OUTPUT");
if (out) {
await Deno.writeTextFile(out, `tag_created=false\n`, { append: true });
} else {
console.error("GITHUB_OUTPUT not set.");
}
}
async function run(cmd: string, args: string[]) {