Files
easy_tdx_max/.github/workflows/release.yml
T
Justin Gu c1d1349c8b docs(ci): Release 模板正文补充杀软误报说明与体积修正
v1.32.4 有用户反馈 Defender 报 Trojan:Win32/Wacatac.C!ml——未签名
PyInstaller 单文件的典型 ML 误报。把误报说明(核验步骤/VirusTotal
交叉验证/微软误报申诉入口)固化进 release.yml 的 body 模板,
后续版本自动携带;体积描述 80-150MB 修正为实际的 40-50MB。
2026-09-06 01:24:47 +08:00

110 lines
3.9 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: Release EXE
# 打 tag 时构建 Windows 单 EXE 并发布到 GitHub Release。
# 与 publish.ymlPyPI)并行独立:即使 PyPI 发布失败,EXE 仍可发布,
# 提高发布韧性。Phase 1 产物未签名,老人首次运行会被 SmartScreen 拦截,
# 需手动"更多信息 → 仍要运行"——Phase 2 引入代码签名后解决。
on:
push:
tags:
- "v*"
permissions:
contents: write # softprops/action-gh-release 创建 Release 需要
jobs:
build-windows:
name: Build Windows EXE
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
cache-dependency-path: web-ui/package-lock.json
# 构建前端 → web-ui/dist/。必须在 pip install 前:pyproject.toml 的
# force-include 要求 web-ui/dist 存在,否则 pip install -e . 报错。
- name: Build frontend
run: |
npm ci
npm run build
working-directory: web-ui
# 安装后端(含 [web,packaging,baostock] extrasfastapi/uvicorn +
# pystray/Pillow + baostock 自动兜底数据源——EXE 内置全量灾备链)
- name: Install Python deps
run: |
pip install -e ".[web,packaging,baostock]"
pip install pyinstaller
- name: Build EXE
run: pyinstaller easy_tdx.spec --noconfirm
# 重命名为带版本号的文件名,方便老人下载时识别
- name: Rename EXE with version
shell: bash
run: |
VERSION="${GITHUB_REF_NAME#v}"
mv dist/easy-tdx.exe "dist/easy-tdx-${VERSION}-windows.exe"
ls -lh dist/
- uses: actions/upload-artifact@v4
with:
name: easy-tdx-windows-exe
path: dist/easy-tdx-*-windows.exe
if-no-files-found: error
release:
name: Publish GitHub Release
needs: build-windows
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: easy-tdx-windows-exe
path: dist
- name: Create release
uses: softprops/action-gh-release@v2
with:
files: dist/easy-tdx-*-windows.exe
generate_release_notes: true
body: |
## 下载使用
1. 下载下方 `easy-tdx-*-windows.exe`(约 40-50MB
2. 双击运行
3. 浏览器会自动打开回测界面(地址 `http://localhost:8000`
## ⚠️ SmartScreen 提示
本版本未做代码签名,首次运行 Windows 会弹出"已保护你的电脑":
1. 点击 **更多信息**
2. 点击 **仍要运行**
Phase 2 将引入代码签名消除此提示。
## 🛡️ 杀软误报说明(Windows Defender 报毒?请先读这里)
部分 Windows Defender 用户会看到 `Trojan:Win32/Wacatac.C!ml` 报警。
`.exe` 由 GitHub Actions 在公开的 tag 提交上从源码构建(本文件即构建脚本),
为**未签名的 PyInstaller 单文件**打包——"自解压 + 无签名"特征是杀软
机器学习引擎(`!ml` 后缀即 ML 判定)的经典误报源头,v1.32.1 起各版本
构建方式相同。自行核验:
1. 核对 Release 说明中公布的 SHA256PowerShell`Get-FileHash *.exe`
2. 可上传 [VirusTotal](https://www.virustotal.com/) 交叉验证:典型误报特征是
少数 ML 启发式引擎报警、主流特征码引擎(Kaspersky/ESET/BitDefender 等)不报
3. 哈希一致仍想加速白名单,可向微软提交误报申诉:
[microsoft.com/en-us/wdsi/filesubmission](https://www.microsoft.com/en-us/wdsi/filesubmission)(选"软件开发者"