Fix site-packages resolution to correctly bundle dependencies inside … #6
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 | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| workflow_dispatch: | |
| inputs: | |
| tag_name: | |
| description: "Release tag to publish" | |
| required: true | |
| type: string | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-linux: | |
| name: Build Linux Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13" | |
| - name: Build release | |
| run: ./py2c --auto-install assembleRelease --no-upx | |
| - name: Prepare artifact | |
| run: | | |
| mkdir -p dist | |
| cp release/downplay dist/downplay-linux-x86_64 | |
| sha256sum dist/downplay-linux-x86_64 > dist/SHA256SUMS-linux.txt | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux-release | |
| path: dist/* | |
| build-windows: | |
| name: Build Windows Release | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13" | |
| - name: Enable MSVC environment | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| - name: Build release | |
| run: python py2c_windows.py --auto-install assembleRelease | |
| - name: Prepare artifact | |
| shell: pwsh | |
| run: | | |
| New-Item -ItemType Directory -Force dist | Out-Null | |
| Copy-Item release\downplay.exe dist\downplay-windows-x64.exe | |
| Get-FileHash dist\downplay-windows-x64.exe -Algorithm SHA256 | ForEach-Object { "$($_.Hash.ToLower()) downplay-windows-x64.exe" } | Set-Content dist\SHA256SUMS-windows.txt | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-release | |
| path: dist/* | |
| publish: | |
| name: Publish GitHub Release | |
| runs-on: ubuntu-latest | |
| needs: | |
| - build-linux | |
| - build-windows | |
| steps: | |
| - name: Download Linux artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: linux-release | |
| path: dist/linux | |
| - name: Download Windows artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: windows-release | |
| path: dist/windows | |
| - name: Collect assets | |
| run: | | |
| mkdir -p dist/final | |
| cp dist/linux/downplay-linux-x86_64 dist/final/ | |
| cp dist/linux/SHA256SUMS-linux.txt dist/final/ | |
| cp dist/windows/downplay-windows-x64.exe dist/final/ | |
| cp dist/windows/SHA256SUMS-windows.txt dist/final/ | |
| ls -la dist/final | |
| - name: Publish release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ github.event_name == 'workflow_dispatch' && inputs.tag_name || github.ref_name }} | |
| files: dist/final/* | |
| generate_release_notes: true |