重构!v0.2.0版本!理论可以快速写其他框架的适配 #10
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 App | |
on: | |
push: | |
branches: | |
- main # 监听 main 分支上的 push 事件 | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 # Checkout 当前仓库的代码 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' # 配置 Python 版本 | |
architecture: 'x64' | |
- name: Install Requirements | |
run: | | |
pip install -r requirements.txt | |
- name: Run Nuitka build with app.py | |
uses: Nuitka/Nuitka-Action@main | |
with: | |
script-name: app.py | |
mode: onefile | |
nuitka-version: main | |
- name: Upload build files | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-app # Artifact 的名称,可以自定义 | |
path: build/ # 上传的文件或目录的路径 |