浏览代码

ci: publish

Dax Raad 4 月之前
父节点
当前提交
acd33c2fc5
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      script/publish.ts

+ 1 - 0
script/publish.ts

@@ -11,6 +11,7 @@ console.log("=== publishing ===\n")
 const snapshot = process.env["OPENCODE_SNAPSHOT"] === "true"
 const version = await (async () => {
   if (snapshot) return `0.0.0-${new Date().toISOString().slice(0, 16).replace(/[-:T]/g, "")}`
+  if (process.env["OPENCODE_VERSION"]) return process.env["OPENCODE_VERSION"]
   const [major, minor, patch] = (await $`gh release list --limit 1 --json tagName --jq '.[0].tagName'`.text())
     .trim()
     .replace(/^v/, "")