DeepSeek Harness Tauri 桌面版 | Only 8mb installer, zero environment setup, preset plugins, Windows / macOS / Linux.
:tada: 更新osx打包
idealclover583b29a3cee8
diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex ef74d8e8..203d0531 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -174,6 +174,30 @@ jobs:if: steps.check.outputs.should_run == 'true'run: pnpm install --no-frozen-lockfile+ # macOS 正式产物必须完成 Developer ID 签名与 Apple 公证;缺少凭据时直接失败,+ # 避免误发仍需用户手动绕过 Gatekeeper 的 DMG。+ - name: Validate macOS signing secrets+ if: steps.check.outputs.should_run == 'true' && matrix.platform == 'macos-latest'+ shell: bash+ env:+ APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}+ APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}+ APPLE_ID: ${{ secrets.APPLE_ID }}+ APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}+ APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}+ run: |+ missing=()+ for name in APPLE_CERTIFICATE APPLE_CERTIFICATE_PASSWORD APPLE_ID APPLE_PASSWORD APPLE_TEAM_ID; do+ if [ -z "${!name}" ]; then+ missing+=("$name")+ fi+ done++ if [ "${#missing[@]}" -ne 0 ]; then+ printf '::error::Missing required macOS signing secrets: %s\n' "${missing[*]}"+ exit 1+ fi+# 正式发布:release 已由 changelog 任务创建,这里只上传产物。# 注意:不要传 releaseBody —— tauri-action 会用它覆盖已有 release 的正文。- name: Build and Release (For Tags)@@ -184,6 +208,11 @@ jobs:TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}TAURI_BUNDLE_TARGETS: ${{ matrix.platform == 'ubuntu-22.04' && 'appimage,deb' || 'all' }}+ APPLE_CERTIFICATE: ${{ matrix.platform == 'macos-latest' && secrets.APPLE_CERTIFICATE || '' }}+ APPLE_CERTIFICATE_PASSWORD: ${{ matrix.platform == 'macos-latest' && secrets.APPLE_CERTIFICATE_PASSWORD || '' }}+ APPLE_ID: ${{ matrix.platform == 'macos-latest' && secrets.APPLE_ID || '' }}+ APPLE_PASSWORD: ${{ matrix.platform == 'macos-latest' && secrets.APPLE_PASSWORD || '' }}+ APPLE_TEAM_ID: ${{ matrix.platform == 'macos-latest' && secrets.APPLE_TEAM_ID || '' }}with:tagName: ${{ github.ref_name }}releaseName: 'DeepSeek Harness Desktop ${{ github.ref_name }}'@@ -199,6 +228,11 @@ jobs:env:GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}TAURI_BUNDLE_TARGETS: ${{ matrix.platform == 'ubuntu-22.04' && 'appimage,deb' || 'all' }}+ APPLE_CERTIFICATE: ${{ matrix.platform == 'macos-latest' && secrets.APPLE_CERTIFICATE || '' }}+ APPLE_CERTIFICATE_PASSWORD: ${{ matrix.platform == 'macos-latest' && secrets.APPLE_CERTIFICATE_PASSWORD || '' }}+ APPLE_ID: ${{ matrix.platform == 'macos-latest' && secrets.APPLE_ID || '' }}+ APPLE_PASSWORD: ${{ matrix.platform == 'macos-latest' && secrets.APPLE_PASSWORD || '' }}+ APPLE_TEAM_ID: ${{ matrix.platform == 'macos-latest' && secrets.APPLE_TEAM_ID || '' }}with:tagName: ${{ format('test-{0}-{1}', github.ref_name, github.run_number) }}releaseName: 'DeepSeek Harness Desktop 手动测试版 (构建 #${{ github.run_number }})'@@ -209,6 +243,20 @@ jobs:prerelease: trueargs: ${{ matrix.args }}+ - name: Verify macOS signature and notarization+ if: steps.check.outputs.should_run == 'true' && matrix.platform == 'macos-latest'+ shell: bash+ run: |+ app_path="$(find src-tauri/target -type d -path '*/release/bundle/macos/*.app' -print -quit)"+ if [ -z "$app_path" ]; then+ echo '::error::Built macOS app bundle was not found'+ exit 1+ fi++ codesign --verify --deep --strict --verbose=2 "$app_path"+ xcrun stapler validate "$app_path"+ spctl --assess --type execute --verbose=4 "$app_path"+- name: Upload Artifacts (For Manual Trigger)if: steps.check.outputs.should_run == 'true' && github.event_name == 'workflow_dispatch'uses: actions/upload-artifact@v6diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.mdindex 94b6258b..02764409 100644--- a/docs/DEVELOPMENT.md+++ b/docs/DEVELOPMENT.md@@ -33,6 +33,8 @@ cargo checkcargo test```+For Developer ID signing, notarization, and the required GitHub Actions secrets, see [macOS signing and notarization](./MACOS_SIGNING.md).+## Tips-- Debug mode serves on port **3081**, release builds on **3080** — the two never clash, so you can run an installed copy and a dev build side by side.\ No newline at end of file+- Debug mode serves on port **3081**, release builds on **3080** — the two never clash, so you can run an installed copy and a dev build side by side.diff --git a/docs/DEVELOPMENT.zh.md b/docs/DEVELOPMENT.zh.mdindex 2f0121df..3272d81d 100644--- a/docs/DEVELOPMENT.zh.md+++ b/docs/DEVELOPMENT.zh.md@@ -33,6 +33,8 @@ cargo checkcargo test```+macOS 的 Developer ID 签名、公证与 GitHub Actions Secrets 配置见 [macOS 签名与公证](./MACOS_SIGNING.zh.md)。+## 小贴士-- 调试模式使用 **3081** 端口,正式版使用 **3080** —— 两者互不冲突,可以同时运行已安装版本与开发构建。\ No newline at end of file+- 调试模式使用 **3081** 端口,正式版使用 **3080** —— 两者互不冲突,可以同时运行已安装版本与开发构建。diff --git a/docs/MACOS_SIGNING.md b/docs/MACOS_SIGNING.mdnew file mode 100644index 00000000..8c8a0fe9--- /dev/null+++ b/docs/MACOS_SIGNING.md@@ -0,0 +1,68 @@+# macOS signing and notarization++The project distributes DMGs through GitHub Releases, so it uses a `Developer ID Application` certificate rather than the `Apple Distribution` certificate used for the Mac App Store. The release workflow applies a Hardened Runtime signature, submits the app to Apple for notarization, staples the ticket, and verifies the result again with `codesign`, `stapler`, and Gatekeeper after the build.++## Prepare the certificate++An active Apple Developer Program membership is required. Only the team's Account Holder can create a `Developer ID Application` certificate.++1. In Keychain Access on macOS, open Certificate Assistant → Request a Certificate From a Certificate Authority, generate a CSR, and save it to disk.+2. Open [Certificates, Identifiers & Profiles](https://developer.apple.com/account/resources/certificates/list), create a `Developer ID Application` certificate, and upload the CSR.+3. Download the `.cer` file and double-click it to install it in the `login` keychain.+4. Under My Certificates, expand the certificate and confirm that its private key is present.+5. Run the following command. Its output should include `Developer ID Application: ... (TEAM_ID)`:++```bash+security find-identity -v -p codesigning+```++From Keychain Access → My Certificates, export the certificate together with its private key as a password-protected `.p12` file. Never commit the CSR private key, `.p12`, password, or the encoded text produced below.++## Configure GitHub Actions secrets++Convert the `.p12` file to single-line Base64 and copy it to the clipboard:++```bash+openssl base64 -A -in /path/to/DeveloperIDApplication.p12 | pbcopy+```++In the GitHub repository, open Settings → Secrets and variables → Actions and add these repository secrets:++| Secret | Value |+| --- | --- |+| `APPLE_CERTIFICATE` | Base64 text for the `.p12` from the clipboard |+| `APPLE_CERTIFICATE_PASSWORD` | Password selected when exporting the `.p12` |+| `APPLE_ID` | Apple Developer account email address |+| `APPLE_PASSWORD` | An app-specific password created at [Apple Account](https://account.apple.com/), not the account login password |+| `APPLE_TEAM_ID` | Team ID from [Membership details](https://developer.apple.com/account/#/membership/) |++`TAURI_SIGNING_PRIVATE_KEY` and `TAURI_SIGNING_PRIVATE_KEY_PASSWORD` sign Tauri updater artifacts. They are separate from Apple code signing and must remain configured.++The current Tauri 2 bundler creates a temporary keychain from `APPLE_CERTIFICATE`, imports the certificate, and removes the keychain afterward, so no separate `KEYCHAIN_PASSWORD` secret is required. The workflow only passes Apple credentials to macOS builds and fails before packaging when any required secret is absent.++## Verify locally++After installing the certificate in the local keychain, set the notarization credentials for the current terminal and build. `APPLE_PASSWORD` must be an app-specific password:++```bash+export APPLE_SIGNING_IDENTITY='Developer ID Application: Your Name (TEAM_ID)'+export APPLE_ID='[email protected]'+export APPLE_PASSWORD='xxxx-xxxx-xxxx-xxxx'+export APPLE_TEAM_ID='TEAM_ID'+pnpm tauri build --bundles app,dmg+```++Verify the `.app` after the build. Requesting both `app,dmg` keeps the app available for inspection; Tauri notarizes and staples it before creating the DMG:++```bash+APP_PATH='src-tauri/target/release/bundle/macos/Deepseek Harness Desktop.app'+codesign --verify --deep --strict --verbose=2 "$APP_PATH"+xcrun stapler validate "$APP_PATH"+spctl --assess --type execute --verbose=4 "$APP_PATH"+```++Close the terminal when finished to clear the sensitive environment variables. Do not put these exports in repository files or shell startup files.++## Release++Pushing a `v*` tag builds separate signed and notarized DMGs for Intel and Apple Silicon. To test first, manually run `Build & Release` from Actions and select one macOS architecture; manual builds use the same signing, notarization, and verification path.diff --git a/docs/MACOS_SIGNING.zh.md b/docs/MACOS_SIGNING.zh.mdnew file mode 100644index 00000000..e102f6b0--- /dev/null+++ b/docs/MACOS_SIGNING.zh.md@@ -0,0 +1,68 @@+# macOS 签名与公证++项目通过 GitHub Releases 分发 DMG,因此使用 `Developer ID Application` 证书,而不是用于 Mac App Store 的 `Apple Distribution` 证书。发布工作流会完成 Hardened Runtime 签名、Apple 公证和 ticket staple,并在构建后用 `codesign`、`stapler` 与 Gatekeeper 再次校验产物。++## 准备证书++需要有效的 Apple Developer Program 会员资格。只有团队的 Account Holder 能创建 `Developer ID Application` 证书。++1. 在 macOS 的“钥匙串访问”中打开“证书助理 → 从证书颁发机构请求证书”,生成 CSR 并存储到磁盘。+2. 打开 [Certificates, Identifiers & Profiles](https://developer.apple.com/account/resources/certificates/list),新建 `Developer ID Application` 证书并上传 CSR。+3. 下载 `.cer` 并双击安装到 `login` 钥匙串。+4. 在“我的证书”中展开该证书,确认下面存在对应私钥。+5. 执行以下命令,输出应包含 `Developer ID Application: ... (TEAM_ID)`:++```bash+security find-identity -v -p codesigning+```++在“钥匙串访问 → 我的证书”中将证书连同私钥导出为有密码保护的 `.p12` 文件。不要把 CSR 私钥、`.p12`、密码或后续生成的文本提交到仓库。++## 配置 GitHub Actions Secrets++先把 `.p12` 转成单行 Base64 并复制到剪贴板:++```bash+openssl base64 -A -in /path/to/DeveloperIDApplication.p12 | pbcopy+```++再进入 GitHub 仓库的 Settings → Secrets and variables → Actions,添加以下 Repository secrets:++| Secret | 值 |+| --- | --- |+| `APPLE_CERTIFICATE` | 剪贴板中的 `.p12` Base64 文本 |+| `APPLE_CERTIFICATE_PASSWORD` | 导出 `.p12` 时设置的密码 |+| `APPLE_ID` | Apple Developer 账户邮箱 |+| `APPLE_PASSWORD` | 在 [Apple Account](https://account.apple.com/) 创建的 App 专用密码,不是账户登录密码 |+| `APPLE_TEAM_ID` | [Membership details](https://developer.apple.com/account/#/membership/) 中的 Team ID |++`TAURI_SIGNING_PRIVATE_KEY` 与 `TAURI_SIGNING_PRIVATE_KEY_PASSWORD` 是 Tauri 自动更新文件的签名凭据,和 Apple 代码签名是两套独立凭据,仍需保留。++当前 Tauri 2 bundler 会从 `APPLE_CERTIFICATE` 自动建立临时 Keychain、导入证书并在结束后清理,因此不需要额外保存 `KEYCHAIN_PASSWORD`。工作流只把 Apple 凭据传给 macOS 构建;任一 Secret 缺失都会在打包前失败。++## 本地验证++证书安装到本机 Keychain 后,可以临时设置公证凭据并构建。`APPLE_PASSWORD` 必须是 App 专用密码:++```bash+export APPLE_SIGNING_IDENTITY='Developer ID Application: Your Name (TEAM_ID)'+export APPLE_ID='[email protected]'+export APPLE_PASSWORD='xxxx-xxxx-xxxx-xxxx'+export APPLE_TEAM_ID='TEAM_ID'+pnpm tauri build --bundles app,dmg+```++构建完成后验证 `.app`。同时指定 `app,dmg` 会保留可供校验的 app;Tauri 会在生成 DMG 前对它完成公证与 staple:++```bash+APP_PATH='src-tauri/target/release/bundle/macos/Deepseek Harness Desktop.app'+codesign --verify --deep --strict --verbose=2 "$APP_PATH"+xcrun stapler validate "$APP_PATH"+spctl --assess --type execute --verbose=4 "$APP_PATH"+```++终端中的敏感环境变量用完后应关闭该终端窗口。不要把这些 `export` 写进仓库文件或 shell 配置。++## 发布++推送 `v*` tag 会构建 Intel 与 Apple Silicon 两个经过签名和公证的 DMG。也可以先从 Actions 手动运行 `Build & Release` 并只选择一个 macOS 架构;手动构建同样执行完整签名、公证与校验。diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yamlindex b4662141..70d54e3f 100644--- a/pnpm-workspace.yaml+++ b/pnpm-workspace.yaml@@ -8,3 +8,7 @@ trustPolicyIgnoreAfter: 525600patchedDependencies:bumpp: patches/bumpp.patch++allowBuilds:+ '@tailwindcss/oxide': true+ esbuild: truediff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.jsonindex 0ceff6e5..d101c234 100644--- a/src-tauri/tauri.conf.json+++ b/src-tauri/tauri.conf.json@@ -30,6 +30,10 @@"licenseFile": "licenses/INSTALLER-LICENSE.txt","category": "DeveloperTool","copyright": "Copyright © 2026 Deepseek Harness Desktop contributors",+ "macOS": {+ "minimumSystemVersion": "10.15",+ "hardenedRuntime": true+ },"windows": {"nsis": {"template": "templates/installer.nsi",