File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,12 +2,16 @@ name: Build PyInstaller Bundles
22
33on :
44 workflow_dispatch :
5- push :
6- branches :
7- - main
8- pull_request :
9- branches :
10- - main
5+ inputs :
6+ tag :
7+ description : " Release tag (for example v1.0.0)"
8+ required : true
9+ name :
10+ description : " Release title (defaults to tag when omitted)"
11+ required : false
12+ notes :
13+ description : " Release notes (supports Markdown)"
14+ required : false
1115
1216jobs :
1317 package :
5559 working-directory : backend
5660 run : pyinstaller main.spec --clean
5761
58- - name : Archive bundle
62+ - name : Package bundle
63+ run : |
64+ python - <<'PY'
65+ import pathlib
66+ import shutil
67+
68+ archive = pathlib.Path(f"Easy-BabelDOC-${{ matrix.os }}")
69+ shutil.make_archive(str(archive), "zip", "backend/dist")
70+ PY
71+
72+ - name : Upload archive
5973 uses : actions/upload-artifact@v4
6074 with :
6175 name : Easy-BabelDOC-${{ matrix.os }}
62- path : |
63- backend/dist/**
76+ path : Easy-BabelDOC-${{ matrix.os }}.zip
77+
78+ release :
79+ name : Publish Release
80+ needs : package
81+ runs-on : ubuntu-latest
82+ steps :
83+ - name : Download build artifacts
84+ uses : actions/download-artifact@v4
85+ with :
86+ path : artifacts
87+
88+ - name : List downloaded files
89+ run : ls -R artifacts
90+
91+ - name : Publish GitHub Release
92+ uses : softprops/action-gh-release@v2
93+ with :
94+ tag_name : ${{ github.event.inputs.tag }}
95+ name : ${{ github.event.inputs.name || github.event.inputs.tag }}
96+ body : ${{ github.event.inputs.notes }}
97+ files : artifacts/**/*
Original file line number Diff line number Diff line change 8686 - ` Easy-BabelDOC.exe `
8787 - ` README_RUN_FIRST.txt ` (说明默认端口、如何修改配置、常见问题)。
8888 - 可选:在首次运行时弹出提示(控制台或简单 GUI),介绍使用方式。
89+ - GitHub 仓库可通过 ** Build PyInstaller Bundles** 工作流手动触发三平台构建:提交 release tag / 标题 / 说明后,流水线会自动上传三个系统的压缩包并创建 Release。
8990- 如需在线更新,可考虑:
9091 - 提供版本号接口,让应用在启动时检查更新。
9192 - 使用第三方更新器(例如 WinSparkle)或手动引导用户重新下载。
You can’t perform that action at this time.
0 commit comments