-
Notifications
You must be signed in to change notification settings - Fork 4
52 lines (47 loc) · 1.47 KB
/
test-build.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
# 可选,将显示在 GitHub 存储库的“操作”选项卡中的工作流名称
name: Test Build CI
# 指定此工作流的触发器
on:
workflow_dispatch:
inputs:
platform:
description: "platform"
required: true
default: "macos-latest"
type: choice
options:
- macos-latest
- windows-latest
- ubuntu-latest
# 需要运行的作业组合
jobs:
# 编译 Tauri
build-tauri:
runs-on: ${{ inputs.platform}}
steps:
- uses: actions/checkout@v3
# 安装 Node.js
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
# ubuntu-latest webkit2gtk-4.0相关依赖
- name: Install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf
# 安装依赖执行构建,以及推送 github release
- name: Install app dependencies and build it
run: pnpm i && pnpm build
- uses: tauri-apps/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}