Skip to content

Build and Packaging CN

Jazzen Chen edited this page May 24, 2026 · 8 revisions

构建与打包

开发构建

cd src
bun install
bun run prebuild
bun run dev

生产构建

cd src
bun install
bun run prebuild
bun run desktop:build

版本号

发布版本需要保持这些位置一致:

  • src/desktop/tauri.conf.json
  • src/desktop/package.json
  • src/desktop-ui/package.json
  • src/web/package.json
  • 相关 shared packages
  • 当 plugin SDK/package 属于本次发布时,也要同步

Release Packages

当前 release 发布:

  • macOS Apple Silicon DMG
  • Windows x64 Setup EXE
  • Windows x64 MSI
  • Windows portable ZIP
  • Linux x64 AppImage
  • Linux x64 deb

签名

macOS 包在有凭证时可以 Developer ID signed。Notarization 需要 Apple notary credentials。

Windows signing 取决于 CI/release credentials。

GitHub Release Notes

不要只用默认生成的 release notes。人工 release notes 应该提到:

  • 用户可见变化
  • 修复的 GitHub issues
  • 兼容性说明
  • 已知限制
  • 包/签名状态

常见构建问题

现象 处理
Tauri 找不到 frontend output 运行 bun run prebuild
Linux 缺 WebKitGTK 安装发行版对应 Tauri 依赖
Bun 依赖不一致 清理旧 install artifacts 后重新 bun install
macOS signing 失败 检查 Developer ID cert 和环境变量
Windows packaging 失败 检查 WebView2/Wix/NSIS 和 CI runner logs

Clone this wiki locally