This repository has been archived by the owner on Mar 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
139 lines (137 loc) · 4.28 KB
/
app.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
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:
uses: ./.github/workflows/page.yml
Build-app:
needs: Page
strategy:
fail-fast: false
matrix:
os: [windows,ubuntu,macos]
runs-on: ${{ matrix.os }}-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: "recursive"
- 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 with Tauri
strategy:
fail-fast: false
matrix:
os: [windows,ubuntu,macos]
runs-on: ${{ matrix.os }}-latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
submodules: "recursive"
- 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 20.x
uses: actions/setup-node@v4
with:
node-version: "20"
- 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/genish-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/genish-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/*