diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e3471ee..0eee0f4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -50,10 +50,21 @@ jobs: build-tauri: needs: create-release + permissions: + contents: write strategy: fail-fast: false matrix: - platform: [macos-latest, ubuntu-latest, windows-latest] + include: + - platform: 'macos-latest' # for Arm based macs (M1 and above). + args: '--target aarch64-apple-darwin' + - platform: 'macos-latest' # for Intel based macs. + args: '--target x86_64-apple-darwin' + - platform: 'ubuntu-22.04' # for Tauri v1 you could replace this with ubuntu-20.04. + args: '' + - platform: 'windows-latest' + args: '' + runs-on: ${{ matrix.platform }} steps: - name: Checkout repository @@ -65,33 +76,26 @@ jobs: if: matrix.platform == 'ubuntu-latest' run: | sudo apt-get update - sudo apt install libwebkit2gtk-4.1-dev \ - build-essential \ - curl \ - wget \ - file \ - libxdo-dev \ - libssl-dev \ - libayatana-appindicator3-dev \ - librsvg2-dev + sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf - name: Node.js enable corepack run: corepack enable - - name: Node.js setup + - name: setup node uses: actions/setup-node@v4 with: - node-version: 20.x + node-version: lts/* cache: 'yarn' - - name: Rust setup - uses: actions-rs/toolchain@v1 + - name: install Rust stable + uses: dtolnay/rust-toolchain@stable with: - toolchain: stable + # Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds. + targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} - - uses: Swatinem/rust-cache@v1 + - uses: Swatinem/rust-cache@v2 with: - working-directory: "src-tauri" + workspaces: "src-tauri -> target" - name: Install deps uses: bahmutov/npm-install@v1