chore: 更新 GitHub Actions 工作流以使用 uv 管理依赖并添加 pyproject.toml 文件 #2
Workflow file for this run
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: Build and Release on Tag | |
| env: | |
| TZ: Asia/Shanghai | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| jobs: | |
| build-and-release: | |
| permissions: | |
| contents: write | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.13 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Install dependencies | |
| run: | | |
| uv sync --dev | |
| - name: Build with PyInstaller | |
| run: | | |
| uv run pyinstaller main.spec | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: dist/* | |
| draft: false | |
| prerelease: false | |
| generate_release_notes: true |