Ship Tauri 2 to Mac, Windows & Linux | GitHub Actions Matrix Tutorial

Codegiz — Built by Claude AI · Beginner ·🛠️ AI Tools & Apps ·1mo ago

About this lesson

The mature answer to cross-platform desktop distribution is to let GitHub Actions do the work. One tag push, three runners in parallel, three installers attached to a Release. No cross-compilation, no platform-specific tooling on your laptop, no nightly builds of "the Windows one." Source code: https://github.com/GoCelesteAI/tauri_triship We build TriShip, a minimal Tauri 2 app that does nothing but show its host OS, and then wire up a 35-line .github/workflows/release.yml that produces a .dmg, a Windows .exe installer, and a Linux .AppImage from a single git tag v0.1.0 && git push origin v0.1.0. The full Release page with all three downloads is the proof. What You'll Learn: - bundle.targets in tauri.conf.json — dmg + nsis + deb + appimage in one config. Tauri build skips targets that don't apply to the current host, so one config covers all three runners. - on: push: tags: v-star — triggering the workflow only on tagged commits. Normal pushes to main don't fire it, which keeps "development" and "release" cleanly separated. - permissions: contents: write — the per-workflow opt-in that lets the default GITHUB_TOKEN create a Release. Without it, the upload step fails with a 403. - strategy.matrix with three platform entries — one matrix entry per OS, target triple, and artifact glob. fail-fast false keeps one platform's failure from cancelling the others. - Per-platform deps via if: matrix.platform.os == — only Linux needs webkit, app-indicator, librsvg, and patchelf. macOS and Windows have the equivalents built into the OS. - dtolnay/rust-toolchain, pnpm/action-setup, actions/setup-node — the standard toolchain trio. With cache pnpm, subsequent runs save 1-2 minutes per platform. - softprops/action-gh-release — one action handles tag matching, idempotent Release creation, concurrent uploads, and hash digests. All three jobs upload to the same Release matched by tag name. Timestamps: 0:00 - The proof: three installers on one Release page 0:29 - Bundle targets in

Original Description

The mature answer to cross-platform desktop distribution is to let GitHub Actions do the work. One tag push, three runners in parallel, three installers attached to a Release. No cross-compilation, no platform-specific tooling on your laptop, no nightly builds of "the Windows one." Source code: https://github.com/GoCelesteAI/tauri_triship We build TriShip, a minimal Tauri 2 app that does nothing but show its host OS, and then wire up a 35-line .github/workflows/release.yml that produces a .dmg, a Windows .exe installer, and a Linux .AppImage from a single git tag v0.1.0 && git push origin v0.1.0. The full Release page with all three downloads is the proof. What You'll Learn: - bundle.targets in tauri.conf.json — dmg + nsis + deb + appimage in one config. Tauri build skips targets that don't apply to the current host, so one config covers all three runners. - on: push: tags: v-star — triggering the workflow only on tagged commits. Normal pushes to main don't fire it, which keeps "development" and "release" cleanly separated. - permissions: contents: write — the per-workflow opt-in that lets the default GITHUB_TOKEN create a Release. Without it, the upload step fails with a 403. - strategy.matrix with three platform entries — one matrix entry per OS, target triple, and artifact glob. fail-fast false keeps one platform's failure from cancelling the others. - Per-platform deps via if: matrix.platform.os == — only Linux needs webkit, app-indicator, librsvg, and patchelf. macOS and Windows have the equivalents built into the OS. - dtolnay/rust-toolchain, pnpm/action-setup, actions/setup-node — the standard toolchain trio. With cache pnpm, subsequent runs save 1-2 minutes per platform. - softprops/action-gh-release — one action handles tag matching, idempotent Release creation, concurrent uploads, and hash digests. All three jobs upload to the same Release matched by tag name. Timestamps: 0:00 - The proof: three installers on one Release page 0:29 - Bundle targets in
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Related AI Lessons

Up next
I Asked ChatGPT to Apply to 500 Jobs (8 Interviews in 48 Hours)
Sabrina Ramonov 🍄
Watch →