You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
138 lines
3.3 KiB
YAML
138 lines
3.3 KiB
YAML
3 years ago
|
name: Build ui
|
||
3 years ago
|
|
||
|
on:
|
||
|
workflow_dispatch:
|
||
|
push:
|
||
|
branches:
|
||
|
- main
|
||
|
- github-actions
|
||
|
|
||
|
jobs:
|
||
|
build-debug:
|
||
|
|
||
|
runs-on: ${{ matrix.os }}
|
||
|
|
||
|
strategy:
|
||
|
fail-fast: false
|
||
|
matrix:
|
||
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||
|
|
||
|
steps:
|
||
|
- uses: actions/checkout@v2
|
||
|
|
||
3 years ago
|
- name: switch working directory
|
||
|
run: cd mediarepo-ui
|
||
|
|
||
3 years ago
|
- name: Cache Dependencies
|
||
|
id: cache-dependencies
|
||
|
uses: actions/cache@v2
|
||
|
with:
|
||
|
path: |
|
||
|
node_modules
|
||
|
src-tauri/target/**/deps
|
||
|
/home/runner/.cargo/bin
|
||
|
~/.cargo
|
||
|
key: ${{ runner.os }}-dependencies-${{ hashFiles('src-tauri/Cargo.lock') }}-${{ hashFiles('yarn.lock') }}
|
||
|
restore-keys: |
|
||
|
${{ runner.os }}-dependencies-
|
||
|
${{ runner.os }}-release-dependencies-
|
||
|
|
||
|
- name: Use Node.js 16
|
||
|
uses: actions/setup-node@v1
|
||
|
with:
|
||
|
node-version: 16
|
||
|
|
||
|
- name: Install Tauri
|
||
3 years ago
|
run: cargo install tauri-cli --git https://github.com/tauri-apps/tauri
|
||
3 years ago
|
|
||
|
- name: Install Angular CLI
|
||
|
run: npm install -g @angular/cli
|
||
|
|
||
|
- name: Install yarn
|
||
|
run: npm install -g yarn
|
||
|
|
||
|
- name: Install dependencies
|
||
|
run: yarn install
|
||
|
|
||
|
- name: Install OS-specific dependencies
|
||
|
uses: knicknic/os-specific-run@v1.0.3
|
||
|
with:
|
||
|
linux: |
|
||
|
sudo apt update
|
||
|
sudo apt install libwebkit2gtk-4.0-dev libgtk-3-dev libappindicator3-dev -y
|
||
|
|
||
|
- name: Build project
|
||
|
run: cargo tauri build --debug
|
||
|
|
||
|
- name: Upload artifacts
|
||
|
uses: actions/upload-artifact@v2
|
||
|
with:
|
||
|
name: mediarepo-ui-${{ runner.os }}-debug
|
||
|
path: |
|
||
|
src-tauri/target/debug/bundle
|
||
|
src-tauri/target/debug/mediarepo-ui*
|
||
3 years ago
|
|
||
3 years ago
|
build-release:
|
||
|
|
||
|
runs-on: ${{ matrix.os }}
|
||
|
|
||
|
strategy:
|
||
|
fail-fast: false
|
||
|
matrix:
|
||
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||
|
|
||
|
steps:
|
||
|
- uses: actions/checkout@v2
|
||
|
|
||
3 years ago
|
- name: switch working directory
|
||
|
run: cd mediarepo-ui
|
||
|
|
||
3 years ago
|
- name: Cache Dependencies
|
||
|
id: cache-dependencies
|
||
|
uses: actions/cache@v2
|
||
|
with:
|
||
|
path: |
|
||
|
node_modules
|
||
|
src-tauri/target
|
||
3 years ago
|
/home/runner/.cargo
|
||
3 years ago
|
~/.cargo
|
||
|
key: ${{ runner.os }}-release-dependencies-${{ hashFiles('src-tauri/Cargo.lock') }}-${{ hashFiles('yarn.lock') }}
|
||
|
restore-keys: |
|
||
|
${{ runner.os }}-release-dependencies-
|
||
|
${{ runner.os }}-dependencies-
|
||
|
|
||
|
- name: Use Node.js 16
|
||
|
uses: actions/setup-node@v1
|
||
|
with:
|
||
|
node-version: 16
|
||
|
|
||
|
- name: Install Tauri
|
||
3 years ago
|
run: cargo install tauri-cli --git https://github.com/tauri-apps/tauri
|
||
3 years ago
|
|
||
|
- name: Install Angular CLI
|
||
|
run: npm install -g @angular/cli
|
||
|
|
||
|
- name: Install yarn
|
||
|
run: npm install -g yarn
|
||
|
|
||
|
- name: Install dependencies
|
||
|
run: yarn install
|
||
|
|
||
|
- name: Install OS-specific dependencies
|
||
|
uses: knicknic/os-specific-run@v1.0.3
|
||
|
with:
|
||
|
linux: |
|
||
|
sudo apt update
|
||
|
sudo apt install libwebkit2gtk-4.0-dev libgtk-3-dev libappindicator3-dev -y
|
||
|
|
||
|
- name: Build project
|
||
|
run: cargo tauri build
|
||
|
|
||
|
- name: Upload artifacts
|
||
|
uses: actions/upload-artifact@v2
|
||
|
with:
|
||
|
name: mediarepo-ui-${{ runner.os }}-release
|
||
|
path: |
|
||
|
src-tauri/target/release/bundle
|
||
3 years ago
|
src-tauri/target/release/mediarepo-ui*
|