Skip to content

Commit

Permalink
Update publish.yml to add caching and fix for Intel Macs
Browse files Browse the repository at this point in the history
  • Loading branch information
SFSteffensen authored Aug 13, 2024
1 parent a2768ea commit 3151695
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,16 @@ jobs:
include:
- platform: "macos-latest" # for Arm-based Macs (M1 and above).
args: "--target aarch64-apple-darwin"
rust-target: "aarch64-apple-darwin"
- platform: "macos-latest" # for Intel-based Macs.
args: "--target x86_64-apple-darwin"
rust-target: "x86_64-apple-darwin"
- platform: "ubuntu-22.04" # for Ubuntu (Tauri v2)
args: "--target x86_64-unknown-linux-gnu"
rust-target: "x86_64-unknown-linux-gnu"
- platform: "windows-latest" # for Windows
args: "--target x86_64-pc-windows-msvc"
rust-target: "x86_64-pc-windows-msvc"

runs-on: ${{ matrix.platform }}
steps:
Expand All @@ -30,25 +34,32 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: yarn

- name: install Rust stable
- name: install Rust stable and target
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.rust-target }}

- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'

- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
# Installing only the necessary dependencies for Tauri v2 on Ubuntu.
- name: install frontend dependencies
run: yarn install # Change this to npm, pnpm, or bun depending on which one you use.
run: yarn install

- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: app-v__VERSION__ # The action automatically replaces __VERSION__ with the app version.
tagName: app-v__VERSION__ # the action automatically replaces __VERSION__ with the app version.
releaseName: "App v__VERSION__"
releaseBody: "See the assets to download this version and install."
releaseDraft: true
Expand Down

0 comments on commit 3151695

Please sign in to comment.