Skip to content
Latchkey

How to Package a Tauri App for Multiple Platforms in CI

tauri-apps/tauri-action builds the native bundle on each OS, and Linux needs webkit2gtk and related system libraries installed first.

Tauri compiles a Rust binary plus a native bundle per OS. Use tauri-apps/tauri-action in an os matrix, and install the WebKitGTK dependencies on the Linux leg.

Steps

  • Create an os matrix over the three runner labels.
  • On Linux, install libwebkit2gtk-4.1-dev and build tools before building.
  • Run tauri-apps/tauri-action to produce the bundle.

Workflow

.github/workflows/bundle.yml
jobs:
  bundle:
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-22.04, macos-latest, windows-latest]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v4
      - name: Linux deps
        if: runner.os == 'Linux'
        run: |
          sudo apt-get update
          sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential libssl-dev
      - uses: dtolnay/rust-toolchain@stable
      - uses: tauri-apps/tauri-action@v0

Gotchas

  • Missing WebKitGTK packages are the most common Linux Tauri build failure.
  • Pin the Ubuntu version, since the webkit2gtk package name changes between releases.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →