Skip to content

Build app

Build app #7

Workflow file for this run

name: Build app
on:
workflow_dispatch:
workflow_call:
push:
branches:
- main # default branch
paths:
- electron-static/**/**
- Genshin-Impact-Wish-Simulator/src/**/**
- Genshin-Impact-Wish-Simulator/src-tauri/**/**
pull_request:
branches:
- main # default branch
paths:
- electron-static/**/**
- Genshin-Impact-Wish-Simulator/src-tauri/**/**
jobs:
Page:
name: Build Pages
uses: ./.github/workflows/page.yml
Build-app:
name: Build app with Electron
needs: Page
strategy:
fail-fast: false
matrix:
os: [windows,ubuntu,macos]
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: "20"
- 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 app with Tauri
uses: ./.github/workflows/tauri.yml