|
|
@@ -8,13 +8,13 @@
|
|
|
|
|
|
## 工作流文件结构
|
|
|
|
|
|
-| 文件 | 说明 |
|
|
|
-|------|------|
|
|
|
-| `release.yml` | 主工作流,负责调用各平台构建并创建 Release |
|
|
|
-| `build-windows.yml` | Windows 平台构建 |
|
|
|
+| 文件 | 说明 |
|
|
|
+| ----------------------- | -------------------------------- |
|
|
|
+| `release.yml` | 主工作流,负责调用各平台构建并创建 Release |
|
|
|
+| `build-windows.yml` | Windows 平台构建 |
|
|
|
| `build-macos-arm64.yml` | macOS ARM64 平台构建 (Apple Silicon) |
|
|
|
-| `build-macos-x64.yml` | macOS x64 平台构建 (Intel) |
|
|
|
-| `build-linux.yml` | Linux 平台构建 |
|
|
|
+| `build-macos-x64.yml` | macOS x64 平台构建 (Intel) |
|
|
|
+| `build-linux.yml` | Linux 平台构建 |
|
|
|
|
|
|
## 触发条件
|
|
|
|
|
|
@@ -84,15 +84,15 @@ on:
|
|
|
|
|
|
**Target**: `x86_64-pc-windows-msvc`
|
|
|
|
|
|
-| 步骤 | 说明 |
|
|
|
-|------|------|
|
|
|
-| Checkout code | 检出代码 |
|
|
|
-| Setup Node.js | 配置 Node.js 20,启用 npm 缓存 |
|
|
|
-| Install Rust toolchain | 安装 Rust 工具链及 Windows target |
|
|
|
-| Cache Rust | 缓存 Cargo 依赖加速构建 |
|
|
|
-| Install dependencies | 执行 `npm ci` 安装依赖 |
|
|
|
-| Build application | 执行 `node scripts/build.js --target x86_64-pc-windows-msvc` |
|
|
|
-| Upload artifacts | 上传构建产物到 `artifacts-win` |
|
|
|
+| 步骤 | 说明 |
|
|
|
+| ---------------------- | ---------------------------------------------------------- |
|
|
|
+| Checkout code | 检出代码 |
|
|
|
+| Setup Node.js | 配置 Node.js 20,启用 npm 缓存 |
|
|
|
+| Install Rust toolchain | 安装 Rust 工具链及 Windows target |
|
|
|
+| Cache Rust | 缓存 Cargo 依赖加速构建 |
|
|
|
+| Install dependencies | 执行 `npm ci` 安装依赖 |
|
|
|
+| Build application | 执行 `node scripts/build.js --target x86_64-pc-windows-msvc` |
|
|
|
+| Upload artifacts | 上传构建产物到 `artifacts-win` |
|
|
|
|
|
|
---
|
|
|
|
|
|
@@ -102,15 +102,15 @@ on:
|
|
|
|
|
|
**Target**: `aarch64-apple-darwin`
|
|
|
|
|
|
-| 步骤 | 说明 |
|
|
|
-|------|------|
|
|
|
-| Checkout code | 检出代码 |
|
|
|
-| Setup Node.js | 配置 Node.js 20,启用 npm 缓存 |
|
|
|
-| Install Rust toolchain | 安装 Rust 工具链及 ARM64 target |
|
|
|
-| Cache Rust | 缓存 Cargo 依赖加速构建 |
|
|
|
-| Install dependencies | 执行 `npm ci` 安装依赖 |
|
|
|
-| Build application | 执行 `node scripts/build.js --target aarch64-apple-darwin` |
|
|
|
-| Upload artifacts | 上传构建产物到 `artifacts-mac-arm64` |
|
|
|
+| 步骤 | 说明 |
|
|
|
+| ---------------------- | -------------------------------------------------------- |
|
|
|
+| Checkout code | 检出代码 |
|
|
|
+| Setup Node.js | 配置 Node.js 20,启用 npm 缓存 |
|
|
|
+| Install Rust toolchain | 安装 Rust 工具链及 ARM64 target |
|
|
|
+| Cache Rust | 缓存 Cargo 依赖加速构建 |
|
|
|
+| Install dependencies | 执行 `npm ci` 安装依赖 |
|
|
|
+| Build application | 执行 `node scripts/build.js --target aarch64-apple-darwin` |
|
|
|
+| Upload artifacts | 上传构建产物到 `artifacts-mac-arm64` |
|
|
|
|
|
|
---
|
|
|
|
|
|
@@ -120,15 +120,15 @@ on:
|
|
|
|
|
|
**Target**: `x86_64-apple-darwin`
|
|
|
|
|
|
-| 步骤 | 说明 |
|
|
|
-|------|------|
|
|
|
-| Checkout code | 检出代码 |
|
|
|
-| Setup Node.js | 配置 Node.js 20,启用 npm 缓存 |
|
|
|
-| Install Rust toolchain | 安装 Rust 工具链及 x64 target |
|
|
|
-| Cache Rust | 缓存 Cargo 依赖加速构建 |
|
|
|
-| Install dependencies | 执行 `npm ci` 安装依赖 |
|
|
|
-| Build application | 执行 `node scripts/build.js --target x86_64-apple-darwin` |
|
|
|
-| Upload artifacts | 上传构建产物到 `artifacts-mac-x64` |
|
|
|
+| 步骤 | 说明 |
|
|
|
+| ---------------------- | ------------------------------------------------------- |
|
|
|
+| Checkout code | 检出代码 |
|
|
|
+| Setup Node.js | 配置 Node.js 20,启用 npm 缓存 |
|
|
|
+| Install Rust toolchain | 安装 Rust 工具链及 x64 target |
|
|
|
+| Cache Rust | 缓存 Cargo 依赖加速构建 |
|
|
|
+| Install dependencies | 执行 `npm ci` 安装依赖 |
|
|
|
+| Build application | 执行 `node scripts/build.js --target x86_64-apple-darwin` |
|
|
|
+| Upload artifacts | 上传构建产物到 `artifacts-mac-x64` |
|
|
|
|
|
|
---
|
|
|
|
|
|
@@ -138,16 +138,16 @@ on:
|
|
|
|
|
|
**Target**: `x86_64-unknown-linux-gnu`
|
|
|
|
|
|
-| 步骤 | 说明 |
|
|
|
-|------|------|
|
|
|
-| Checkout code | 检出代码 |
|
|
|
-| Setup Node.js | 配置 Node.js 20,启用 npm 缓存 |
|
|
|
-| Install Rust toolchain | 安装 Rust 工具链及 Linux target |
|
|
|
-| Cache Rust | 缓存 Cargo 依赖加速构建 |
|
|
|
+| 步骤 | 说明 |
|
|
|
+| -------------------------- | ------------------------------------------------------------------------------------------------------ |
|
|
|
+| Checkout code | 检出代码 |
|
|
|
+| Setup Node.js | 配置 Node.js 20,启用 npm 缓存 |
|
|
|
+| Install Rust toolchain | 安装 Rust 工具链及 Linux target |
|
|
|
+| Cache Rust | 缓存 Cargo 依赖加速构建 |
|
|
|
| Install Linux dependencies | 安装系统依赖(使用缓存):libwebkit2gtk-4.1-dev, libayatana-appindicator3-dev, librsvg2-dev, patchelf, libgtk-3-dev |
|
|
|
-| Install dependencies | 执行 `npm ci` 安装依赖 |
|
|
|
-| Build application | 执行 `node scripts/build.js --target x86_64-unknown-linux-gnu` |
|
|
|
-| Upload artifacts | 上传构建产物到 `artifacts-linux` |
|
|
|
+| Install dependencies | 执行 `npm ci` 安装依赖 |
|
|
|
+| Build application | 执行 `node scripts/build.js --target x86_64-unknown-linux-gnu` |
|
|
|
+| Upload artifacts | 上传构建产物到 `artifacts-linux` |
|
|
|
|
|
|
---
|
|
|
|
|
|
@@ -159,37 +159,37 @@ on:
|
|
|
|
|
|
**权限**: `contents: write`
|
|
|
|
|
|
-| 步骤 | 说明 |
|
|
|
-|------|------|
|
|
|
-| Download all artifacts | 下载所有平台的构建产物(pattern: `artifacts-*`)并合并 |
|
|
|
-| List artifacts | 列出产物文件(调试用) |
|
|
|
-| Create Release | 使用 `softprops/action-gh-release@v1` 创建 GitHub Release 并上传文件 |
|
|
|
+| 步骤 | 说明 |
|
|
|
+| ---------------------- | ----------------------------------------------------------- |
|
|
|
+| Download all artifacts | 下载所有平台的构建产物(pattern: `artifacts-*`)并合并 |
|
|
|
+| List artifacts | 列出产物文件(调试用) |
|
|
|
+| Create Release | 使用 `softprops/action-gh-release@v1` 创建 GitHub Release 并上传文件 |
|
|
|
|
|
|
---
|
|
|
|
|
|
## 构建矩阵总览
|
|
|
|
|
|
-| 平台 | 运行环境 | Target | Artifact 名称 |
|
|
|
-|------|----------|--------|---------------|
|
|
|
-| Windows | `windows-latest` | `x86_64-pc-windows-msvc` | `artifacts-win` |
|
|
|
-| macOS ARM | `macos-latest` | `aarch64-apple-darwin` | `artifacts-mac-arm64` |
|
|
|
-| macOS Intel | `macos-latest` | `x86_64-apple-darwin` | `artifacts-mac-x64` |
|
|
|
-| Linux | `ubuntu-22.04` | `x86_64-unknown-linux-gnu` | `artifacts-linux` |
|
|
|
+| 平台 | 运行环境 | Target | Artifact 名称 |
|
|
|
+| ----------- | ---------------- | -------------------------- | --------------------- |
|
|
|
+| Windows | `windows-latest` | `x86_64-pc-windows-msvc` | `artifacts-win` |
|
|
|
+| macOS ARM | `macos-latest` | `aarch64-apple-darwin` | `artifacts-mac-arm64` |
|
|
|
+| macOS Intel | `macos-latest` | `x86_64-apple-darwin` | `artifacts-mac-x64` |
|
|
|
+| Linux | `ubuntu-22.04` | `x86_64-unknown-linux-gnu` | `artifacts-linux` |
|
|
|
|
|
|
---
|
|
|
|
|
|
## 发布产物
|
|
|
|
|
|
-| 平台 | 文件 | 说明 |
|
|
|
-|------|------|------|
|
|
|
-| **Windows** | `*-win-x64-setup.exe` | NSIS 安装程序(推荐) |
|
|
|
-| | `*-win-x64-portable.exe` | 便携版 |
|
|
|
-| | `*-win-x64.msi` | MSI 安装程序 |
|
|
|
-| **macOS** | `*-mac-arm64.dmg` | Apple Silicon (M1/M2/M3) |
|
|
|
-| | `*-mac-x64.dmg` | Intel |
|
|
|
-| **Linux** | `*-linux-x64.deb` | Debian/Ubuntu |
|
|
|
-| | `*-linux-x64.rpm` | Fedora/RHEL/CentOS |
|
|
|
-| | `*-linux-x64.AppImage` | 通用 AppImage |
|
|
|
+| 平台 | 文件 | 说明 |
|
|
|
+| ----------- | ------------------------ | ------------------------ |
|
|
|
+| **Windows** | `*-win-x64-setup.exe` | NSIS 安装程序(推荐) |
|
|
|
+| | `*-win-x64-portable.exe` | 便携版 |
|
|
|
+| | `*-win-x64.msi` | MSI 安装程序 |
|
|
|
+| **macOS** | `*-mac-arm64.dmg` | Apple Silicon (M1/M2/M3) |
|
|
|
+| | `*-mac-x64.dmg` | Intel |
|
|
|
+| **Linux** | `*-linux-x64.deb` | Debian/Ubuntu |
|
|
|
+| | `*-linux-x64.rpm` | Fedora/RHEL/CentOS |
|
|
|
+| | `*-linux-x64.AppImage` | 通用 AppImage |
|
|
|
|
|
|
---
|
|
|
|
|
|
@@ -198,20 +198,21 @@ on:
|
|
|
Tauri 应用签名私钥从项目中的 `.keys/tauri-signing.key` 文件读取。
|
|
|
|
|
|
**优先级**:
|
|
|
+
|
|
|
1. 如果项目中存在 `.keys/tauri-signing.key` 文件,优先使用该文件内容
|
|
|
2. 否则回退到 `TAURI_SIGNING_PRIVATE_KEY` 环境变量(来自 Secrets)
|
|
|
|
|
|
-**注意**:`.keys/` 目录应添加到 `.gitignore`,避免将私钥提交到版本控制。
|
|
|
+
|
|
|
|
|
|
---
|
|
|
|
|
|
## 所需 Secrets
|
|
|
|
|
|
-| 名称 | 用途 |
|
|
|
-|------|------|
|
|
|
-| `TAURI_SIGNING_PRIVATE_KEY` | Tauri 应用签名私钥(备用,当 `.keys/tauri-signing.key` 不存在时使用) |
|
|
|
-| `TAURI_SIGNING_PRIVATE_KEY_PASSWORD` | 签名私钥密码(当前为空) |
|
|
|
-| `GITHUB_TOKEN` | GitHub Release 创建(自动提供) |
|
|
|
+| 名称 | 用途 |
|
|
|
+| ------------------------------------ | --------------------------------------------------- |
|
|
|
+| `TAURI_SIGNING_PRIVATE_KEY` | Tauri 应用签名私钥(备用,当 `.keys/tauri-signing.key` 不存在时使用) |
|
|
|
+| `TAURI_SIGNING_PRIVATE_KEY_PASSWORD` | 签名私钥密码(当前为空) |
|
|
|
+| `GITHUB_TOKEN` | GitHub Release 创建(自动提供) |
|
|
|
|
|
|
---
|
|
|
|