Point downloads to latest release #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: release | |
| on: | |
| push: | |
| tags: ["v*"] | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13" | |
| - run: python -m pip install --upgrade pip | |
| - run: python -m pip install -r requirements-dev.txt | |
| - name: Run tests | |
| run: python -m pytest -q | |
| env: | |
| QT_QPA_PLATFORM: offscreen | |
| RUST_PAINTER_TEST_TIMEOUT_SCALE: "8" | |
| - name: Build executable | |
| run: .\build.ps1 | |
| - name: Write SHA256 checksum | |
| run: | | |
| $hash = (Get-FileHash dist\RustPainter.exe -Algorithm SHA256).Hash.ToLower() | |
| "$hash RustPainter.exe" | Out-File -Encoding ascii dist\RustPainter.exe.sha256 | |
| Write-Host "SHA256: $hash" | |
| # Always available, so `workflow_dispatch` can produce a test build | |
| # without cutting a tag. | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: RustPainter-windows-x64 | |
| path: | | |
| dist/RustPainter.exe | |
| dist/RustPainter.exe.sha256 | |
| - name: Publish release | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| dist/RustPainter.exe | |
| dist/RustPainter.exe.sha256 | |
| generate_release_notes: true | |