diff --git a/.github/workflows/call-rust-tauri.yml b/.github/workflows/call-rust-tauri.yml index 5156d0f..6862374 100644 --- a/.github/workflows/call-rust-tauri.yml +++ b/.github/workflows/call-rust-tauri.yml @@ -35,7 +35,7 @@ jobs: strategy: fail-fast: false matrix: - settings: + include: - platform: "macos-latest" args: "--target aarch64-apple-darwin" - platform: "macos-latest" @@ -45,7 +45,7 @@ jobs: - platform: "windows-latest" args: "" - runs-on: ${{ matrix.settings.platform }} + runs-on: ${{ matrix.platform }} defaults: run: working-directory: ${{ inputs.node_workdir }} @@ -53,7 +53,7 @@ jobs: - uses: actions/checkout@v4 - name: linux install dependencies uses: awalsh128/cache-apt-pkgs-action@latest - if: matrix.settings.platform == 'ubuntu-latest' + if: matrix.platform == 'ubuntu-latest' with: packages: libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf version: rust-tauri-ci @@ -112,7 +112,7 @@ jobs: - name: install stable toolchain uses: dtolnay/rust-toolchain@stable with: - targets: ${{ matrix.settings.platform == 'macos-latest' && (contains(matrix.settings.arg, 'x86_64') && 'x86_64-apple-darwin') || (contains(matrix.settings.arg, 'aarch64') && 'aarch64-apple-darwin') || '' }} + targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} - name: rust cache uses: swatinem/rust-cache@v2 @@ -138,7 +138,7 @@ jobs: - id: tauri-action - uses: tauri-apps/tauri-action@v0 + uses: tauri-apps/tauri-action@dev env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: @@ -147,7 +147,7 @@ jobs: releaseBody: ${{ github.event.head_commit.message }} releaseDraft: true prerelease: false - args: ${{ matrix.settings.args }} + args: ${{ matrix.args }} - name: upload tauri-artifact uses: actions/upload-artifact@v3 diff --git a/templates/rust-tauri/extra.j2 b/templates/rust-tauri/extra.j2 index 44941d6..cb2e4d6 100644 --- a/templates/rust-tauri/extra.j2 +++ b/templates/rust-tauri/extra.j2 @@ -5,7 +5,7 @@ permissions: strategy: fail-fast: false matrix: - settings: + include: - platform: "macos-latest" args: "--target aarch64-apple-darwin" - platform: "macos-latest" @@ -15,7 +15,7 @@ strategy: - platform: "windows-latest" args: "" -runs-on: ${{ matrix.settings.platform }} +runs-on: ${{ matrix.platform }} {% endraw -%} defaults: run: @@ -27,7 +27,7 @@ steps: {% macro apt_cache(version, packages=[]) -%} - name: linux install dependencies uses: awalsh128/cache-apt-pkgs-action@latest - if: matrix.settings.platform == 'ubuntu-latest' + if: matrix.platform == 'ubuntu-latest' with: packages: {% for package in packages -%} {{ package }} {% endfor +%} version: {{ version }} @@ -39,7 +39,7 @@ steps: - name: install stable toolchain uses: dtolnay/rust-toolchain@stable with: - targets: ${{ matrix.settings.platform == 'macos-latest' && (contains(matrix.settings.arg, 'x86_64') && 'x86_64-apple-darwin') || (contains(matrix.settings.arg, 'aarch64') && 'aarch64-apple-darwin') || '' }} + targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} - name: rust cache uses: swatinem/rust-cache@v2 @@ -55,7 +55,7 @@ steps: {% set tauri -%} {%- raw %} - id: tauri-action - uses: tauri-apps/tauri-action@v0 + uses: tauri-apps/tauri-action@dev env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: @@ -64,6 +64,6 @@ steps: releaseBody: ${{ github.event.head_commit.message }} releaseDraft: true prerelease: false - args: ${{ matrix.settings.args }} + args: ${{ matrix.args }} {% endraw -%} {%- endset %}