chore: release v1.0.1 #3
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: Release Build | |
| on: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - 'v[0-9]+.[0-9]+.[0-9]+' | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-and-release: | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| platform: linux | |
| suffix: linux | |
| runs-on: ${{matrix.os}} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Install dependencies | |
| run: uv sync --all-packages | |
| - name: Build with PyInstaller | |
| # 建议在 spec 文件里保持输出文件名统一,然后在这里重命名 | |
| run: | | |
| uv run pyinstaller pynergy-client.spec | |
| - name: Rename artifacts for clarity | |
| # 将 dist 里的通用文件名改为带平台标识的文件名,方便用户下载 | |
| shell: bash | |
| run: | | |
| mv dist/pynergy-client dist/pynergy-client-${{matrix.suffix}} | |
| - name: Release and Upload Assets | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| # files 支持通配符,会自动寻找并上传 | |
| files: | | |
| dist/pynergy-client-${{matrix.suffix}} | |
| # 如果 Tag 不存在,它会自动创建 Release。如果已存在,它会把文件追加进去 | |
| tag_name: ${{github.ref_name}} | |
| generate_release_notes: true | |
| env: | |
| GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |