diff --git a/.github/scripts/update_version_manifest.py b/.github/scripts/update_version_manifest.py index c2839797..57438318 100644 --- a/.github/scripts/update_version_manifest.py +++ b/.github/scripts/update_version_manifest.py @@ -152,6 +152,15 @@ def merge_release(current, tag, name, notes, downloads, published_date=None): if not tag.startswith("v"): raise ValueError(f"Expected a version tag, got {tag!r}") metadata = version_info(tag, published_date) + # Clients require the full artifact version to match the advertised + # desktop version, including its date and patch spelling. + for platform, download in downloads.items(): + if (platform.startswith(("windows-", "macos-", "linux-")) + and download["version"] != metadata["version"]): + raise ValueError( + f"Desktop release {tag} expects version {metadata['version']}, " + f"but {platform} artifact {download['filename']} " + f"has version {download['version']}") current_order = release_order(current) if current_order is not None and release_order(metadata) < current_order: current_version = current.get("latest_version") or current.get("version") diff --git a/docs/UPDATER.md b/docs/UPDATER.md index 992e81f1..946fdd37 100644 --- a/docs/UPDATER.md +++ b/docs/UPDATER.md @@ -64,6 +64,12 @@ GitHub Actions 从分支手动打包时,在 `Build and Release` 的 同版本仍可更新发布说明,新版本正常发布。各平台下载记录也不会被较低 版本覆盖,包括独立移动端发布和桌面 Release 附带的移动端安装包。 +桌面 Release 中所有桌面安装包及便携包的完整版本必须与标签去掉 `v` +前缀后的版本一致,包括日期和 patch 的位置;不能只按数字版本比较。 +任一包不匹配时,脚本报告标签、平台、文件名及双方版本,终止清单生成, +不写入输出文件。手动发布时应使用与安装包一致的完整版本标签,例如 +`v1.7.4-20261021`。iOS、Android 安装包保持独立版本。 + 本地构建可以设置同名环境变量,或使用: ```sh