feat: 添加 GitHub Actions 工作流以构建和发布标签 #1
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 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install pyinstaller | |
| - name: Build with PyInstaller | |
| run: | | |
| pyinstaller main.spec | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: dist/* | |
| draft: false | |
| prerelease: false | |
| generate_release_notes: true |