fix(ci): 版本校验在浅克隆下必然误报
构建客户端 / 检查(类型 + 单元测试) (push) Waiting to run
构建客户端 / Linux x64(deb + AppImage) (push) Blocked by required conditions
构建客户端 / Windows x64(NSIS 安装包) (push) Blocked by required conditions
构建客户端 / macOS 通用(.app + .dmg) (push) Blocked by required conditions

- fix(ci): checkout 改成 fetch-depth: 0——没有标签、提交数恒为 1 时,
  version.mjs --check 算出来的版本一定是 0.0.0+1,于是每次推送都红
- fix(version): CHANGELOG 按标签区间重算全部历史,不再只渲染当前版本,
  否则每次发布都会把上一版那一段覆盖掉
- fix(build): 固件包文件名用算出来的版本,不再用 BUILD-INFO.json 里那套旧编号
This commit is contained in:
2026-10-19 02:42:53 +08:00
parent 896b21fe44
commit d9a27b69f3
8 changed files with 195 additions and 134 deletions
+16
View File
@@ -174,7 +174,11 @@ jobs:
runs-on: ${{ vars.RUNNER_LINUX || 'ubuntu-latest' }}
timeout-minutes: 45
steps:
# 版本号从标签算(git describe / rev-list --count)。默认的浅克隆没有标签、
# 提交数恒为 1,version.mjs --check 会误报「版本已过期」——必须先取全历史。
- uses: actions/checkout@v4
with:
fetch-depth: 0
# runner 镜像里多半没有 rustup,而 dtolnay/rust-toolchain 靠它装工具链。
# 这里只装一个最小的 rustup 本身,工具链交给下面那个 action —— 这样自建
@@ -260,7 +264,11 @@ jobs:
TARGET: x86_64-unknown-linux-gnu
CARGO_BUILD_TARGET: x86_64-unknown-linux-gnu
steps:
# 版本号从标签算(git describe / rev-list --count)。默认的浅克隆没有标签、
# 提交数恒为 1,version.mjs --check 会误报「版本已过期」——必须先取全历史。
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 确保有 rustup
run: |
@@ -377,7 +385,11 @@ jobs:
npm_config_cache: C:\Users\admin\runner\windows\cache\ci-npm
RUNNER_TOOL_CACHE: C:\Users\admin\runner\windows\cache\ci-toolcache
steps:
# 版本号从标签算(git describe / rev-list --count)。默认的浅克隆没有标签、
# 提交数恒为 1,version.mjs --check 会误报「版本已过期」——必须先取全历史。
- uses: actions/checkout@v4
with:
fetch-depth: 0
# 宿主模式的 Windows runner 上,PATH 里的 `bash` 是 C:\Windows\System32\bash.exe
# —— WSL 的启动器,而 WSL 在 runner 账户下起不来,报 E_ACCESSDENIED(日志里是
@@ -512,7 +524,11 @@ jobs:
# cargo 步骤,所有目标都由 tauri build 的 --target 交代。
TARGET: universal-apple-darwin
steps:
# 版本号从标签算(git describe / rev-list --count)。默认的浅克隆没有标签、
# 提交数恒为 1,version.mjs --check 会误报「版本已过期」——必须先取全历史。
- uses: actions/checkout@v4
with:
fetch-depth: 0
# 通用包要两个架构的 std 都在。
- name: 装 Rust(stable + 两个 mac 目标)