feat: 添加GitHub Actions自动打包EXE工作流

- .github/workflows/build-exe.yml: 打tag时自动在Windows环境打包exe并发布Release
- requirements.txt改为纯英文注释, 兼容Wine打包环境
- .gitignore排除PyInstaller的dist/build目录
This commit is contained in:
MCLauncher committed 2026-08-05 22:54:40 +08:00
1 parent 697c2babf1
commit b250a7de5e
3 files changed
+43 -2

No files matched your search

+38
View File
@@ -0,0 +1,38 @@
name: Build Windows EXE
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
steps:
- name: 检出代码
uses: actions/checkout@v4
- name: 安装 Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: 安装 PyInstaller
run: pip install pyinstaller
- name: 打包 EXE
run: pyinstaller --onefile --name MeowLauncher --clean launcher.py
- name: 上传构建产物 (Artifact)
uses: actions/upload-artifact@v4
with:
name: MeowLauncher-windows-exe
path: dist/MeowLauncher.exe
- name: 发布到 Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: dist/MeowLauncher.exe
generate_release_notes: true
+3
View File
@@ -3,3 +3,6 @@ __pycache__/
*.pyo
*.tmp
.mc-lock
dist/
build/
*.spec
+2 -2
View File
@@ -1,2 +1,2 @@
# 本项目零第三方依赖, 仅使用 Python 标准库。
# 无需 pip install 任何包。
# This project uses only the Python standard library.
# No third-party packages required. Nothing to install.