v0.4.33 — diagnostic build: colored panel overlays + rect readouts #58
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*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| # Pin to a specific stable so local-vs-CI clippy drift surfaces | |
| # at PR time, not at tag-push time. Bump intentionally; don't | |
| # silently inherit `@stable`. Versioned tags don't ship rustfmt | |
| # or clippy by default — request them explicitly. | |
| # | |
| # KEEP IN SYNC WITH .github/workflows/ci.yml — toolchain version, | |
| # components, and the three gate commands below must match. See | |
| # the comment block at the top of ci.yml for why. | |
| - uses: dtolnay/rust-toolchain@1.95.0 | |
| with: | |
| components: rustfmt, clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Verify tag matches Cargo.toml version | |
| shell: pwsh | |
| run: | | |
| $tag = "${{ github.ref_name }}" -replace '^v','' | |
| $cargo = (Select-String -Path Cargo.toml -Pattern '^version = "(.*)"').Matches.Groups[1].Value | |
| if ($tag -ne $cargo) { | |
| Write-Error "tag '$tag' does not match Cargo.toml version '$cargo' — bump Cargo.toml before tagging" | |
| exit 1 | |
| } | |
| echo "Release version: $tag" | |
| # ── Quality gates (survival-guide §12). Fail fast if fmt would | |
| # catch a regression that's about to ship. | |
| # | |
| # v0.4.28 — dropped `cargo clippy --release` and `cargo test | |
| # --release` from this workflow. Both already run on every PR | |
| # via ci.yml (in debug mode, which catches the same correctness | |
| # issues at ~1/3 the build time). Running them again here in | |
| # *release* mode was redundant paranoia that added 3-5 minutes | |
| # to every tag-push for zero additional safety: by the time a | |
| # commit lands on `main` and gets tagged, it's already been | |
| # through CI. The release build below also re-uses the | |
| # `Swatinem/rust-cache` cache populated by the prior build, | |
| # so the release compile itself is the only remaining big | |
| # chunk. | |
| - name: cargo fmt --check | |
| run: cargo fmt --check | |
| - name: Build release | |
| run: cargo build --release | |
| # ── ffmpeg bundle ─────────────────────────────────────────────── | |
| # v0.4.28: pinned to a specific autobuild tag (was: "latest"), | |
| # AND cached. The pin makes the cache key stable across builds | |
| # so we stop downloading 120 MB every release. Bump the tag | |
| # below intentionally when a new ffmpeg version is wanted — | |
| # don't track "latest", which silently rotated. | |
| - name: Cache bundled ffmpeg | |
| id: ffmpeg-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: target/release/ffmpeg.exe | |
| key: ffmpeg-lgpl-${{ env.FFMPEG_PIN }} | |
| env: | |
| FFMPEG_PIN: autobuild-2026-05-12-13-59 | |
| - name: Download + extract ffmpeg (cache miss) | |
| if: steps.ffmpeg-cache.outputs.cache-hit != 'true' | |
| shell: pwsh | |
| env: | |
| FFMPEG_PIN: autobuild-2026-05-12-13-59 | |
| run: | | |
| $tag = $env:FFMPEG_PIN | |
| # BtbN's autobuild asset filename convention. | |
| $asset = "ffmpeg-N-$tag-win64-lgpl.zip" | |
| # Some autobuild tags use `master-latest` naming instead of N-…; | |
| # the safest universal fallback is to enumerate the release's | |
| # assets and pick the win64-lgpl non-shared one. | |
| $api = "https://api.github.com/repos/BtbN/FFmpeg-Builds/releases/tags/$tag" | |
| $rel = Invoke-RestMethod -Uri $api -Headers @{ "User-Agent" = "tbss-ci" } | |
| $dlAsset = $rel.assets | | |
| Where-Object { $_.name -like '*win64-lgpl*.zip' -and $_.name -notlike '*shared*' } | | |
| Select-Object -First 1 | |
| if (-not $dlAsset) { | |
| Write-Error "no win64-lgpl asset found on BtbN release $tag" | |
| exit 1 | |
| } | |
| $url = $dlAsset.browser_download_url | |
| $zip = "$env:TEMP\ffmpeg-lgpl.zip" | |
| $extract = "$env:TEMP\ffmpeg-lgpl" | |
| Write-Host "Downloading $url" | |
| Invoke-WebRequest $url -OutFile $zip | |
| Expand-Archive $zip -DestinationPath $extract -Force | |
| $exe = Get-ChildItem -Path $extract -Recurse -Filter 'ffmpeg.exe' | Select-Object -First 1 | |
| if (-not $exe) { | |
| Write-Error "ffmpeg.exe not found in extracted archive" | |
| exit 1 | |
| } | |
| $dest = "target\release\ffmpeg.exe" | |
| New-Item -ItemType Directory -Path (Split-Path $dest) -Force | Out-Null | |
| Copy-Item $exe.FullName -Destination $dest -Force | |
| $size = [math]::Round((Get-Item $dest).Length / 1MB, 1) | |
| Write-Host "Bundled ffmpeg.exe ($size MB) at $dest" | |
| - name: Confirm bundled ffmpeg present | |
| shell: pwsh | |
| run: | | |
| if (-not (Test-Path 'target\release\ffmpeg.exe')) { | |
| Write-Error 'ffmpeg.exe missing from target\release\ — cache restore must have failed' | |
| exit 1 | |
| } | |
| $size = [math]::Round((Get-Item 'target\release\ffmpeg.exe').Length / 1MB, 1) | |
| Write-Host "ffmpeg.exe present ($size MB)" | |
| # ── cargo-wix (v0.4.28: cached) ──────────────────────────────── | |
| # cargo install cargo-wix used to recompile from source every | |
| # build, eating ~1-2 min. Cache the installed binary by Rust | |
| # toolchain version (which is pinned above), and skip the | |
| # install step entirely on cache hit. | |
| - name: Cache cargo-wix | |
| id: wix-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo/bin/cargo-wix.exe | |
| key: cargo-wix-${{ runner.os }}-rust-1.95.0 | |
| - name: Install cargo-wix (cache miss) | |
| if: steps.wix-cache.outputs.cache-hit != 'true' | |
| run: cargo install cargo-wix | |
| - name: Download WiX 3.11 portable binaries | |
| shell: pwsh | |
| run: | | |
| $url = 'https://github.com/wixtoolset/wix3/releases/download/wix3112rtm/wix311-binaries.zip' | |
| $zip = "$env:TEMP\wix311.zip" | |
| $dest = "$env:TEMP\wix311" | |
| Invoke-WebRequest $url -OutFile $zip | |
| Expand-Archive $zip -DestinationPath $dest | |
| echo "$dest" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
| - name: Build MSI installer | |
| # cargo-wix auto-defines -dVersion from Cargo.toml's version; we no | |
| # longer pass our own, which collided with candle.exe (CNDL0288). | |
| run: cargo wix --nocapture | |
| - name: Upload MSI | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: tinybooth-sound-studio-windows-msi | |
| path: target/wix/*.msi | |
| - uses: actions/upload-artifact@v5 | |
| with: | |
| name: tinybooth-sound-studio-windows | |
| path: target/release/tinybooth-sound-studio.exe | |
| release: | |
| needs: [build-windows] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/download-artifact@v5 | |
| with: | |
| path: artifacts | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| artifacts/tinybooth-sound-studio-windows/tinybooth-sound-studio.exe | |
| artifacts/tinybooth-sound-studio-windows-msi/*.msi | |
| generate_release_notes: true |