加入构建脚本,并修复setup.py #10
This file contains hidden or 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: Snapshot Build / 快照构建 | |
| on: | |
| push: | |
| branches: | |
| - main # 假设您的主分支是 main | |
| jobs: | |
| build-and-release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 检查代码 | |
| uses: actions/checkout@v4 | |
| - name: 设置 Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.x' | |
| - name: 安装依赖 | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install setuptools wheel pillow | |
| - name: 构建 | |
| run: | | |
| python setup.py bdist_wheel | |
| - name: 上传 Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: mctoast-snapshot | |
| path: dist/*.whl |