This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Windows Application | |
on: | |
push: | |
branches: | |
- main # 触发条件,可以根据需要修改 | |
pull_request: | |
jobs: | |
build: | |
runs-on: windows-latest # 使用 Windows 环境 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' # 设置 Python 版本 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pyinstaller # 安装 PyInstaller | |
pip install -r requirements-pod-client.txt # 安装项目依赖 | |
- name: Build application | |
run: | | |
pyinstaller --onefile --windowed pod_client.py --name PodTools.exe # 使用 PyInstaller 打包 | |
- name: Upload built application | |
uses: actions/upload-artifact@v3 | |
with: | |
name: PodTools # 上传的文件名 | |
path: dist/PodTools.exe # 修改为你的输出文件路径 |