Skip to content

Commit

Permalink
fix macos tauri action
Browse files Browse the repository at this point in the history
  • Loading branch information
tangbo committed Apr 27, 2024
1 parent 033bd18 commit 6a78d67
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/call-rust-tauri.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
strategy:
fail-fast: false
matrix:
settings:
include:
- platform: "macos-latest"
args: "--target aarch64-apple-darwin"
- platform: "macos-latest"
Expand All @@ -45,15 +45,15 @@ jobs:
- platform: "windows-latest"
args: ""

runs-on: ${{ matrix.settings.platform }}
runs-on: ${{ matrix.platform }}
defaults:
run:
working-directory: ${{ inputs.node_workdir }}
steps:
- 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
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand Down
12 changes: 6 additions & 6 deletions templates/rust-tauri/extra.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ permissions:
strategy:
fail-fast: false
matrix:
settings:
include:
- platform: "macos-latest"
args: "--target aarch64-apple-darwin"
- platform: "macos-latest"
Expand All @@ -15,7 +15,7 @@ strategy:
- platform: "windows-latest"
args: ""

runs-on: ${{ matrix.settings.platform }}
runs-on: ${{ matrix.platform }}
{% endraw -%}
defaults:
run:
Expand All @@ -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 }}
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -64,6 +64,6 @@ steps:
releaseBody: ${{ github.event.head_commit.message }}
releaseDraft: true
prerelease: false
args: ${{ matrix.settings.args }}
args: ${{ matrix.args }}
{% endraw -%}
{%- endset %}

0 comments on commit 6a78d67

Please sign in to comment.