Skip to content

Commit

Permalink
chore: update build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
1zun4 committed Mar 21, 2024
1 parent b324684 commit a504e05
Showing 1 changed file with 10 additions and 20 deletions.
30 changes: 10 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Build
on:
push:
branches: [ tauri ]
branches: [ tauri_v2 ]

jobs:
build-tauri:
Expand All @@ -23,39 +23,29 @@ jobs:
node-version: 21

- name: install Rust
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@nightly

- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf libx11-dev xorg-dev libglu1-mesa-dev libglib2.0-0 libgtk2.0-dev
sudo apt-get install -y libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev patchelf
- name: Cache cargo registry
uses: actions/cache@v3
- name: Setup Cargo dependency cache
uses: Swatinem/rust-cache@v2
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v3
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}

- name: Cache tauri build
uses: actions/cache@v3
with:
path: ./src-tauri/target
key: ${{ runner.os }}-tauri-build-target-${{ hashFiles('**/Cargo.lock') }}
shared-key: shared

- name: install app dependencies and build it
run: yarn && yarn build

- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
with:
args: --verbose

- uses: actions/upload-artifact@v3
if: matrix.platform == 'ubuntu-latest'
Expand Down

0 comments on commit a504e05

Please sign in to comment.