From 8749bbae72c12c51aab9412490331039660949fe Mon Sep 17 00:00:00 2001 From: wangjia <809946525@qq.com> Date: Tue, 16 Jun 2026 12:20:12 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E6=96=B0=E5=A2=9E=20test-ios=20workflow?= =?UTF-8?q?=20=E6=89=8B=E5=8A=A8=E9=AA=8C=E8=AF=81=20iOS=20=E7=AD=BE?= =?UTF-8?q?=E5=90=8D=E4=B8=8A=E4=BC=A0=E9=93=BE=E8=B7=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 只跑 iOS 构建+上传 TestFlight,workflow_dispatch 触发,默认版本 v0.0.1 (build 号最低,不与正式发版冲突),用于验证 7 个签名 secret 配置正确。 Co-Authored-By: Claude Opus 4.8 --- .gitea/workflows/test-ios.yml | 36 +++++++++++++++++++++++++++++++++++ .gitignore | 3 +++ 2 files changed, 39 insertions(+) create mode 100644 .gitea/workflows/test-ios.yml diff --git a/.gitea/workflows/test-ios.yml b/.gitea/workflows/test-ios.yml new file mode 100644 index 0000000..9dbc456 --- /dev/null +++ b/.gitea/workflows/test-ios.yml @@ -0,0 +1,36 @@ +name: Test iOS Build + +# 手动触发,只跑 iOS 构建 + 上传 TestFlight,用于验证签名链路(证书/Profile/API Key) +# 是否正常,无需打 tag 发版。默认版本 v0.0.1(build 号最低=1,不与正式发版冲突)。 +on: + workflow_dispatch: + inputs: + version: + description: '测试版本号(build 号由此推导,默认 v0.0.1 不与正式版冲突)' + required: true + type: string + default: 'v0.0.1' + +jobs: + build-ios: + runs-on: mac + env: + PUB_HOSTED_URL: https://pub.flutter-io.cn + FLUTTER_STORAGE_BASE_URL: https://storage.flutter-io.cn + + steps: + - uses: actions/checkout@v4 + + - name: Provision (idempotent — auto-runs if host not initialized) + run: sh scripts/ci/provision-mac.sh + + - name: Compile & upload to TestFlight (Flutter iOS) + env: + IOS_DIST_CERT_P12_BASE64: ${{ secrets.IOS_DIST_CERT_P12_BASE64 }} + IOS_DIST_CERT_PASSWORD: ${{ secrets.IOS_DIST_CERT_PASSWORD }} + IOS_PROVISIONING_PROFILE_BASE64: ${{ secrets.IOS_PROVISIONING_PROFILE_BASE64 }} + IOS_TEAM_ID: ${{ secrets.IOS_TEAM_ID }} + APPSTORE_API_KEY_ID: ${{ secrets.APPSTORE_API_KEY_ID }} + APPSTORE_API_ISSUER_ID: ${{ secrets.APPSTORE_API_ISSUER_ID }} + APPSTORE_API_KEY_P8_BASE64: ${{ secrets.APPSTORE_API_KEY_P8_BASE64 }} + run: sh scripts/ci/compile-ios.sh "${{ inputs.version }}" diff --git a/.gitignore b/.gitignore index 83a536a..219f753 100644 --- a/.gitignore +++ b/.gitignore @@ -59,3 +59,6 @@ backend/issue # Claude 私有文件 .claude/commands/ .claude/worktrees/ + +# iOS 证书私钥(绝不入库) +.ios-certs/