-
Notifications
You must be signed in to change notification settings - Fork 0
98 lines (85 loc) · 2.75 KB
/
Copy pathrelease.yml
File metadata and controls
98 lines (85 loc) · 2.75 KB
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
name: Release
on:
push:
tags:
- 'v*'
# GITHUB_TOKEN 需要写 Release 的权限
permissions:
contents: write
# 确保同一时间只有一个 release 流程在运行
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- platform: windows-latest
target: x86_64-pc-windows-msvc
label: Windows-x64
- platform: macos-latest
target: aarch64-apple-darwin
label: macOS-arm64
- platform: macos-latest
target: x86_64-apple-darwin
label: macOS-x64
- platform: ubuntu-22.04
target: x86_64-unknown-linux-gnu
label: Linux-x64
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: src-tauri -> target
# Linux 依赖
- name: Install Linux dependencies
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
libappindicator3-dev \
librsvg2-dev \
patchelf \
libssl-dev \
libgtk-3-dev \
libsoup-3.0-dev \
libjavascriptcoregtk-4.1-dev
- name: Install frontend dependencies
run: npm ci
- name: Build Tauri app
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: ${{ github.ref_name }}
releaseName: 'PHP-Stack ${{ github.ref_name }}'
releaseBody: |
## PHP-Stack ${{ github.ref_name }}
### 下载说明
| 平台 | 文件 | 说明 |
|------|------|------|
| Windows | `.msi` / `.exe` | 推荐使用 `.msi` 安装包 |
| macOS (Apple Silicon) | `.dmg` (aarch64) | M1/M2/M3 芯片 |
| macOS (Intel) | `.dmg` (x64) | Intel 芯片 |
| Linux | `.AppImage` / `.deb` | 推荐使用 `.AppImage` |
> ⚠️ 未签名版本,安装时可能需要手动允许运行。
> - **Windows**: 点击"更多信息" → "仍要运行"
> - **macOS**: 系统偏好设置 → 安全性与隐私 → 允许打开
releaseDraft: false
prerelease: true
args: --target ${{ matrix.target }}