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 d3c05c7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 21 deletions.
28 changes: 8 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,27 @@ 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 }}

- uses: actions/upload-artifact@v3
if: matrix.platform == 'ubuntu-latest'
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"shortDescription": "A LiquidBounce launcher for Minecraft",
"longDescription": "A LiquidBounce hacked-client launcher for the game Minecraft",
"license": "GPL-3.0",
"licenseFile": "LICENSE",
"licenseFile": "../LICENSE",
"resources": [],
"targets": [
"updater",
Expand Down

0 comments on commit d3c05c7

Please sign in to comment.