v0.8.0 #31
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: | |
| release: | |
| types: [created] | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-and-upload: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Install dependencies and pyinstaller | |
| run: | | |
| uv sync --all-groups | |
| - name: Get version from tag | |
| id: version | |
| run: | | |
| TAG="${{ github.event.release.tag_name }}" | |
| VERSION="${TAG#v}" | |
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | |
| - name: Build with PyInstaller | |
| run: | | |
| uv run pyinstaller qq.spec | |
| - name: Add VERSION file to package directory | |
| run: | | |
| echo "${{ steps.version.outputs.version }}" > dist/qq/VERSION | |
| - name: Update version in installation scripts | |
| run: | | |
| VERSION="${{ steps.version.outputs.version }}" | |
| for script in scripts/installation_scripts/*; do | |
| sed -i "s/__VERSION__/$VERSION/g" "$script" | |
| done | |
| - name: Create tarball | |
| run: | | |
| cd dist | |
| tar -czf ../qq-release.tar.gz qq/ | |
| cd .. | |
| - name: Upload release assets | |
| run: | | |
| # upload the package | |
| gh release upload ${{ github.event.release.tag_name }} qq-release.tar.gz | |
| # upload installation scripts | |
| gh release upload ${{ github.event.release.tag_name }} scripts/installation_scripts/* | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |