ci: put CI keychain first in codesign search list
Some checks failed
TestFlight / testflight (push) Failing after 19s

codesign resolves signing identities through the user keychain search
list (first match wins) and ignores --keychain for the lookup. This
runner hosts another project whose keychain holds the same Apple
Distribution identity, so when that keychain is locked, codesign fails
with errSecInternalComponent no matter how correctly our own keychain
is set up. Prepend the fresh CI keychain to the search list for the
build and always delete it afterward, which restores the original list.

Also drop the runner-diagnostics step, the GitHub-hosted Ruby PATH
export, and the duplicate CODE_SIGN_IDENTITY param.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-11 13:01:42 -07:00
parent 20a310a4b1
commit e7b81f24bd
2 changed files with 59 additions and 70 deletions

View File

@@ -9,15 +9,10 @@ on:
jobs:
testflight:
runs-on: macos-arm64
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Ruby
uses: ruby/setup-ruby@v1
@@ -27,19 +22,7 @@ jobs:
working-directory: ios
- name: Install XcodeGen
run: |
set -euo pipefail
if ! command -v xcodegen >/dev/null 2>&1; then
brew install xcodegen
fi
- name: Runner diagnostics
run: |
set -euo pipefail
whoami
printf 'HOME=%s\n' "$HOME"
security default-keychain -d user || true
security list-keychains -d user || true
run: command -v xcodegen >/dev/null 2>&1 || brew install xcodegen
- name: Upload to TestFlight
working-directory: ios
@@ -53,7 +36,4 @@ jobs:
SYBIL_BUILD_NUMBER: ${{ github.run_number }}
FASTLANE_SKIP_UPDATE_CHECK: "1"
FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT: "120"
run: |
export PATH="/Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/bin:${PATH}"
ruby --version
bundle exec fastlane ios beta
run: bundle exec fastlane ios beta