Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

Build app

Build app #14

Workflow file for this run

name: Build app
on:
workflow_dispatch:
workflow_call:
push:
branches:
- main # default branch
- without-custom-stars
paths:
- electron-static/*
- Genshin-Impact-Wish-Simulator/*
pull_request:
branches:
- main # default branch
- without-custom-stars
paths:
- electron-static/*
- Genshin-Impact-Wish-Simulator/*
jobs:
Page:
name: Build Page
uses: ./.github/workflows/page.yml
Build-app:
name: Build with Electron
needs: Page
strategy:
matrix:
os: [windows,ubuntu,macos]
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 16.x
uses: actions/setup-node@v4
with:
node-version: "16"
- name: Cache NPM dependencies
uses: actions/cache@v3
with:
path: ./electron-static/node_modules
key: ${{ runner.os }}-npm-app-cache
restore-keys: |
${{ runner.os }}-npm-app-cache
- name: Install Dependencies
run: |
cd electron-static
yarn install
- name: Download Artifact
uses: actions/download-artifact@v3
- name: extract new
if: runner.os == 'Linux' || runner.os == 'macOS'
run: |
7z x ./frontend -oelectron-static/ -y
- name: extract new(For Windows)
if: runner.os == 'windows'
run: |
7z x .\frontend -oelectron-static/ -y
- name: Build
run: |
cd electron-static
yarn run build
- name: Package (${{ runner.os }})
run: |
cd electron-static
7z a -tzip genish-impact-${{ runner.os }}-x64.zip ./genish-impact-*
- name: Upload (${{ runner.os }})
uses: actions/upload-artifact@v3
with:
name: genish-impact-${{ runner.os }}
path: electron-static/genish-impact-${{ runner.os }}-x64.zip
Build-Tauri:
name: Build with Tauri
strategy:
fail-fast: false
matrix:
os: [windows,ubuntu,macos]
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v4
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: install dependencies (ubuntu only)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- name: Use Node.js 16.x
uses: actions/setup-node@v4
with:
node-version: "16"
- name: Sync submodule
run: |
git submodule update --init --recursive
- name: Cache NPM dependencies
uses: actions/cache@v3
with:
path: ./Genshin-Impact-Wish-Simulator/node_modules
key: ${{ runner.OS }}-npm-frontend-cache
restore-keys: |
${{ runner.OS }}-npm-frontend-cache
- name: Install Dependencies
run: |
cd Genshin-Impact-Wish-Simulator
yarn install
- name: Build
run: |
cd Genshin-Impact-Wish-Simulator
yarn run tauri build
ls
- name: Upload (Windows)
if: runner.os == 'windows'
uses: actions/upload-artifact@v3
with:
name: genish-impact-Tauri-${{ runner.os }}
path: Genshin-Impact-Wish-Simulator/src-tauri/target/release/bundle/
- name: Upload Appimage (Linux)
if: runner.os == 'Linux'
uses: actions/upload-artifact@v3
with:
name: genish-impact-Tauri-${{ runner.os }}-appimage
path: Genshin-Impact-Wish-Simulator/src-tauri/target/release/bundle/appimage/genshin-picker_*.AppImage
- name: Upload deb (Linux)
if: runner.os == 'Linux'
uses: actions/upload-artifact@v3
with:
name: genish-impact-Tauri-${{ runner.os }}-deb
path: Genshin-Impact-Wish-Simulator/src-tauri/target/release/bundle/deb/genshin-picker_*.deb
- name: Upload dmg (Macos)
if: runner.os == 'macos'
uses: actions/upload-artifact@v3
with:
name: genish-impact-Tauri-${{ runner.os }}
path: Genshin-Impact-Wish-Simulator/src-tauri/target/release/bundle/dmg/*