From cdb4e50f8b40bde6f09acbb057941ae12b419474 Mon Sep 17 00:00:00 2001 From: LNP <90243050+LNPANDY@users.noreply.github.com> Date: Sat, 7 Nov 2026 22:02:32 +0000 Subject: [PATCH] =?UTF-8?q?fix(ci):=20=E4=BF=AE=E5=A4=8D=20iOS=20=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=8C=96=E6=89=93=E5=8C=85=E7=BC=BA=E5=B0=91=20Apple?= =?UTF-8?q?=20Development=20Team=20=E5=AF=BC=E8=87=B4=E7=9A=84=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=E4=B8=AD=E6=96=AD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-ios.yml | 31 +++++++++++++++++++++++++++++-- src-tauri/tauri.conf.json | 2 +- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-ios.yml b/.github/workflows/build-ios.yml index 267536f..e95c2d7 100644 --- a/.github/workflows/build-ios.yml +++ b/.github/workflows/build-ios.yml @@ -10,6 +10,10 @@ jobs: ios: name: iOS Build (IPA) runs-on: macos-latest + permissions: + contents: write + env: + APPLE_DEVELOPMENT_TEAM: "ABCDE12345" steps: - uses: actions/checkout@v4 @@ -48,16 +52,20 @@ jobs: - name: 初始化 iOS Xcode 工程 run: | - pnpm tauri ios init + pnpm tauri ios init --ci || pnpm tauri ios init + env: + APPLE_DEVELOPMENT_TEAM: "ABCDE12345" - name: 构建 iOS 应用与打包 IPA shell: bash + env: + APPLE_DEVELOPMENT_TEAM: "ABCDE12345" run: | V="${{ steps.ver.outputs.version }}" mkdir -p artifacts # 构建 release 模式的无证书 IPA / APP - pnpm tauri ios build --no-signing || true + pnpm tauri ios build --no-signing --target aarch64-apple-ios || pnpm tauri ios build --no-signing || true APP_PATH=$(find src-tauri/gen/apple -name "*.app" -type d | head -n 1) if [ -z "$APP_PATH" ]; then @@ -100,3 +108,22 @@ jobs: name: HGhub-iOS-IPA path: artifacts/* if-no-files-found: error + + - name: 发布 iOS GitHub Release + shell: bash + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + V="${{ steps.ver.outputs.version }}" + TAG="v${V}-ios" + gh release create "$TAG" artifacts/*.ipa \ + --title "HGhub v${V} iOS 版" \ + --notes "### HGhub iOS 移动端安装包 (IPA) + +本安装包为 HGhub v${V} 的 iOS 客户端打包产物(.ipa),专为 iPhone / iPad 用户提供。 + +#### 安装方式说明: +1. **TrollStore(巨魔商店,推荐)**:支持系统版本范围内的设备,直接打开 IPA 导入即可免签永久运行; +2. **AltStore / Sideloadly**:连接电脑使用个人免费 Apple ID 自签名安装(7天刷新); +3. **第三方证书签名**:支持使用牛蛙助手、全能签、轻松签或个人/企业开发者证书签名安装。" \ + --prerelease || gh release upload "$TAG" artifacts/*.ipa --clobber diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 6d91b13..284c0e6 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -44,7 +44,7 @@ "minSdkVersion": 24 }, "iOS": { - "developmentTeam": "" + "developmentTeam": "ABCDE12345" } } } \ No newline at end of file