mirror of
https://github.com/modelstudioai/cli.git
synced 2026-09-14 19:49:23 +08:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| be3033baf9 |
@@ -47,7 +47,7 @@ workflow 的 `channel` 输入**只决定 npm dist-tag**(如 `mcp` / `plugin` /
|
||||
1. 在 GitHub 触发 Publish workflow,mode 选 `channel`,channel 填 npm dist-tag 名:
|
||||
- **`bailian-cli`**:npm 发到该 tag;二进制同时刷新 CDN `sync-release.json`(与 tag 名无关)。本机验证:`BAILIAN_CHANNEL=sync-release`
|
||||
- **`knowledge-studio-cli`**:仅 npm(自动跳过 binary,不碰 `sync-release.json`)
|
||||
2. CI 自动:生成 `0.0.0-beta-<sha7>-<date>` → 临时 bump → 自检 → **npm 发到 dist-tag** →(bailian-cli)**Bun 编二进制 + GH prerelease + 覆盖 `sync-release.json`** → 还原 package.json
|
||||
2. CI 自动:生成 `0.0.0-beta-<sha7>-<YYYYMMDDHHMM>`(UTC 到分钟;同 commit 同分钟重跑会覆盖同号)→ 临时 bump → 自检 → **npm 发到 dist-tag** →(bailian-cli)**Bun 编二进制 + GH prerelease + 覆盖 `sync-release.json`** → 还原 package.json
|
||||
3. 对应脚本:`tools/release/publish-channel.mjs`
|
||||
|
||||
### stable 发布
|
||||
|
||||
@@ -34,7 +34,7 @@ export function pushTag(tag, remote = "origin") {
|
||||
run("git", ["push", remote, tag]);
|
||||
}
|
||||
|
||||
/** UTC stamp for channel beta versions: `YYYYMMDDHHMM` (minute resolution). */
|
||||
export function utcDateStamp() {
|
||||
const iso = runCapture("date", ["-u", "+%Y%m%d"]);
|
||||
return iso;
|
||||
return runCapture("date", ["-u", "+%Y%m%d%H%M"]);
|
||||
}
|
||||
|
||||
@@ -60,8 +60,8 @@ function restoreOriginals() {
|
||||
try {
|
||||
step("compute channel version");
|
||||
const sha = headSha7();
|
||||
const date = utcDateStamp();
|
||||
const betaVersion = `0.0.0-beta-${sha}-${date}`;
|
||||
const stamp = utcDateStamp(); // YYYYMMDDHHMM (UTC)
|
||||
const betaVersion = `0.0.0-beta-${sha}-${stamp}`;
|
||||
log(`channel=${channel} version=${betaVersion}`);
|
||||
|
||||
step("temporarily bump package.json (not committed)");
|
||||
|
||||
Reference in New Issue
Block a user