Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
ef4754c676 | |||
3b7298d09d | |||
672b17872f | |||
bd8daaf54a |
@ -1,5 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
set +H
|
||||||
|
|
||||||
ENTRYPOINT="$1"
|
ENTRYPOINT="$1"
|
||||||
FLAGS_STRING="${2:-}"
|
FLAGS_STRING="${2:-}"
|
||||||
@ -57,7 +58,7 @@ append_section() {
|
|||||||
}
|
}
|
||||||
append_section "feat" "Features" "✨"
|
append_section "feat" "Features" "✨"
|
||||||
append_section "fix" "Fixes" "🐛"
|
append_section "fix" "Fixes" "🐛"
|
||||||
append_section "chore" "Chores" "🧹"
|
# append_section "chore" "Chores" "🧹"
|
||||||
|
|
||||||
# Fallback if no commits found
|
# Fallback if no commits found
|
||||||
[[ -z "$CHANGELOG" ]] && CHANGELOG="No commit history found."
|
[[ -z "$CHANGELOG" ]] && CHANGELOG="No commit history found."
|
||||||
|
@ -29,14 +29,20 @@ if (branch.startsWith("prerelease-")) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const tag = `v${version}`;
|
const tag = `v${version}`;
|
||||||
|
console.log(`Tag: ${tag}`);
|
||||||
let created = true;
|
let created = true;
|
||||||
try {
|
try {
|
||||||
await run("git", ["rev-parse", tag]);
|
await run("git", ["rev-parse", tag]);
|
||||||
console.log(`Tag ${tag} already exists.`);
|
console.log(`Tag ${tag} already exists.`);
|
||||||
created = false;
|
created = false;
|
||||||
} catch {
|
} catch {
|
||||||
await run("git", ["tag", tag]);
|
try {
|
||||||
await run("git", ["push", "origin", tag]);
|
await run("git", ["tag", tag]);
|
||||||
|
await run("git", ["push", "origin", tag]);
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e);
|
||||||
|
created = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (created) {
|
if (created) {
|
||||||
const out = Deno.env.get("GITHUB_OUTPUT");
|
const out = Deno.env.get("GITHUB_OUTPUT");
|
||||||
@ -54,6 +60,7 @@ if (created) {
|
|||||||
} else {
|
} else {
|
||||||
console.error("GITHUB_OUTPUT not set.");
|
console.error("GITHUB_OUTPUT not set.");
|
||||||
}
|
}
|
||||||
|
Deno.exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function run(cmd: string, args: string[]) {
|
async function run(cmd: string, args: string[]) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user