opencode/scripts/publish-github-action.ts
2025-07-16 16:12:31 +08:00

16 lines
414 B
TypeScript
Executable file

#!/usr/bin/env bun
import { $, ShellError } from "bun"
try {
await $`git tag -d github-v1`
await $`git push origin :refs/tags/github-v1`
} catch (e) {
if (e instanceof ShellError && e.stderr.toString().match(/tag \S+ not found/)) {
console.log("tag not found, continuing...")
} else {
throw e
}
}
await $`git tag -a github-v1 -m "Update github-v1 to latest"`
await $`git push origin github-v1`