2022-04-15 21:47:14 -04:00
|
|
|
name: Build
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
tags:
|
|
|
|
- v*
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
|
|
|
jobs:
|
2022-08-08 20:01:11 -04:00
|
|
|
build:
|
|
|
|
name: App
|
2022-04-15 21:47:14 -04:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
platform: [ubuntu-latest, windows-latest]
|
|
|
|
runs-on: ${{ matrix.platform }}
|
|
|
|
|
|
|
|
steps:
|
2022-06-22 00:00:47 -04:00
|
|
|
- uses: actions/checkout@v3
|
2022-04-15 21:47:14 -04:00
|
|
|
|
2022-07-24 00:25:53 -04:00
|
|
|
- name: Setup Node
|
2022-06-21 22:34:08 -04:00
|
|
|
uses: actions/setup-node@v3
|
2022-04-15 21:47:14 -04:00
|
|
|
with:
|
|
|
|
node-version: 16
|
2022-07-24 00:25:53 -04:00
|
|
|
cache: npm
|
2022-04-15 21:47:14 -04:00
|
|
|
|
2022-07-24 00:25:53 -04:00
|
|
|
- name: Install Rust Stable
|
2022-04-15 21:47:14 -04:00
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
|
2022-07-24 00:25:53 -04:00
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
name: Cache Rust Build
|
|
|
|
with:
|
|
|
|
shared-key: tauri-build-${{ matrix.platform }}
|
|
|
|
workspaces: src-tauri
|
|
|
|
|
|
|
|
- name: Install Linux Dependencies
|
2022-04-15 21:47:14 -04:00
|
|
|
if: matrix.platform == 'ubuntu-latest'
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
2022-04-28 01:06:08 -04:00
|
|
|
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev libglew2.1 patchelf
|
2022-04-15 21:47:14 -04:00
|
|
|
|
2022-07-24 00:25:53 -04:00
|
|
|
- name: Install NPM Dependencies and Mock Binaries
|
2022-04-15 21:47:14 -04:00
|
|
|
run: |
|
|
|
|
npm ci
|
2022-04-16 01:08:46 -04:00
|
|
|
npm run mock-bin
|
2022-04-15 21:47:14 -04:00
|
|
|
npm run build
|
|
|
|
|
|
|
|
- uses: tauri-apps/tauri-action@v0
|
2022-07-24 00:25:53 -04:00
|
|
|
name: Build Tauri App
|
2022-07-22 22:35:39 -04:00
|
|
|
timeout-minutes: 30
|
2022-04-15 21:47:14 -04:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2022-04-20 00:51:37 -04:00
|
|
|
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|