2020-09-26 20:44:36 +00:00
|
|
|
name: "CI"
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches-ignore:
|
|
|
|
- 'dependabot/**'
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test-tauri:
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
platform: [macos-latest, ubuntu-latest, windows-latest]
|
|
|
|
|
|
|
|
runs-on: ${{ matrix.platform }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2020-09-26 23:36:40 +00:00
|
|
|
- name: Get yarn cache directory path
|
|
|
|
id: yarn-cache-dir-path
|
|
|
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
|
|
- uses: actions/cache@v2
|
|
|
|
id: yarn-cache
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
|
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-yarn-
|
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.cargo/registry
|
|
|
|
~/.cargo/git
|
|
|
|
~/.cargo/bin
|
|
|
|
src-tauri/target
|
|
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-cargo-
|
2020-09-26 20:44:36 +00:00
|
|
|
- name: setup node
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: 12
|
|
|
|
- name: install Rust stable
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
- name: install tauri bundler
|
2020-09-26 23:59:11 +00:00
|
|
|
run: cargo install tauri-bundler
|
2020-09-26 20:44:36 +00:00
|
|
|
- name: install webkit2gtk (ubuntu only)
|
|
|
|
if: matrix.platform == 'ubuntu-latest'
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
2020-09-26 22:02:26 +00:00
|
|
|
sudo apt-get install -y webkit2gtk-4.0 squashfs-tools
|
2020-09-26 20:44:36 +00:00
|
|
|
- name: install app dependencies
|
|
|
|
run: yarn
|
|
|
|
- uses: tauri-apps/tauri-action@v0
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
npmScript: "tauri:build"
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2020-09-26 22:02:26 +00:00
|
|
|
name: my-artifact ${{ matrix.node-version }}
|
2020-09-26 20:44:36 +00:00
|
|
|
path: src-tauri/target/release/bundle
|