adds output for tag created
This commit is contained in:
parent
8bd828ee96
commit
817ea1715b
@ -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, {
|
||||
|
Loading…
x
Reference in New Issue
Block a user