fix(release): fetch version tags only

This commit is contained in:
t8y2
2026-06-25 12:07:11 +08:00
parent 39c1255af5
commit 5142ca4a4b
+12 -1
View File
@@ -54,7 +54,7 @@ const repoRoot = run("git", ["rev-parse", "--show-toplevel"]).stdout.trim();
process.chdir(repoRoot);
if (!skipFetch) {
run("git", ["fetch", "--tags", "--quiet", "origin"]);
fetchReleaseTags();
}
if (!target) {
@@ -344,6 +344,17 @@ function ensureGhReady(workflow) {
run("gh", ["workflow", "view", workflow, "--repo", REPO], { stdio: "inherit" });
}
function fetchReleaseTags() {
run("git", [
"fetch",
"--quiet",
"origin",
"+refs/tags/v*:refs/tags/v*",
"+refs/tags/packages-v*:refs/tags/packages-v*",
"+refs/tags/agents-v*:refs/tags/agents-v*",
]);
}
function run(command, commandArgs, options = {}) {
const result = spawnSync(command, commandArgs, {
cwd: process.cwd(),