重构项目结构,更新依赖管理,优化代码组织,所以是v0.2.0.1 #11
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 事件 | |
paths: | |
- '**/*.py' # 监听所有 .py 文件 | |
- 'pyproject.toml' | |
- 'pdm.lock' | |
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 PDM | |
run: | | |
python -m pip install pdm | |
- name: Install Dependencies | |
run: | | |
pdm install --production | |
- name: Run Nuitka build with onefile mode | |
uses: Nuitka/Nuitka-Action@main | |
with: | |
script-name: jmcomic_api/__main__.py | |
mode: onefile | |
nuitka-version: main | |
- name: Upload build files | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-ok-app # Artifact 的名称,可以自定义 | |
path: build/ # 上传的文件或目录的路径 |