Skip to content

ci(apple): persistent signing — stop minting throwaway certs every run#34

Merged
MatheusKindrazki merged 1 commit into
mainfrom
fix/ci-persistent-signing
May 31, 2026
Merged

ci(apple): persistent signing — stop minting throwaway certs every run#34
MatheusKindrazki merged 1 commit into
mainfrom
fix/ci-persistent-signing

Conversation

@MatheusKindrazki
Copy link
Copy Markdown
Owner

Problema

Os jobs de archive Apple assinavam com CODE_SIGN_STYLE=Automatic + -allowProvisioningUpdates. Em runners efêmeros do GitHub, isso cria um certificado de Development novo a cada run — acumulou dezenas de certs Created via API / Development e estourou o limite de certificados da conta. Resultado: todo archive falhava com Your account has reached the maximum number of certificates + No profiles found. O caminho de release no CI nunca produziu um build assinado (falhou em abril e agora).

Causa raiz

-allowProvisioningUpdates num runner sem certificado persistente = fábrica de certificados-lixo. O próprio ExportOptions.plist já documentava a solução prevista ("CI step sets this up with fastlane match or manual p12 import") — só nunca foi implementada.

Correção (signing manual persistente)

  • Nova composite action .github/actions/setup-apple-signing: importa um .p12 de Apple Distribution num keychain temporário (set-key-partition-list p/ codesign headless) e instala os provisioning profiles.
  • apple-release.yml / apple-production.yml: chamam a action, removem -allowProvisioningUpdates, buildam com CODE_SIGN_STYLE=Manual.
  • ExportOptions.plist: signingStyle automatic → manual.
  • docs/ops/ci-signing-setup.md: setup único (revogar certs-lixo, exportar .p12, baixar profiles, criar os 3 secrets).

⚠️ Requer 3 secrets novos antes do próximo build assinar

Secret Conteúdo
BUILD_CERT_P12_B64 base64 do .p12 Apple Distribution
BUILD_CERT_PASSWORD senha do .p12
PROVISIONING_PROFILES_B64 base64 de um .tar.gz dos profiles App Store

Passo-a-passo completo em docs/ops/ci-signing-setup.md. Também é preciso revogar os certs Created via API / Development no portal pra liberar o limite.

🤖 Generated with Claude Code

The Apple archive jobs signed with CODE_SIGN_STYLE=Automatic +
-allowProvisioningUpdates. On ephemeral CI runners that creates a NEW
Development certificate on every run, which accumulated dozens of
"Created via API" Development certs and exhausted the account's
certificate limit — making every archive fail with "Your account has
reached the maximum number of certificates" + "No profiles found".
The CI release path had in fact never produced a signed build.

Fix: manual signing with a persistent Apple Distribution certificate and
App Store provisioning profiles seeded as GitHub secrets.

- Add composite action .github/actions/setup-apple-signing: imports the
  .p12 into a temporary keychain (set-key-partition-list for headless
  codesign) and installs profiles into ~/Library/MobileDevice/Provisioning
  Profiles.
- apple-release.yml / apple-production.yml: call the action, drop
  -allowProvisioningUpdates, build with CODE_SIGN_STYLE=Manual.
- ExportOptions.plist: signingStyle automatic -> manual.
- docs/ops/ci-signing-setup.md: one-time setup (revoke garbage certs,
  export .p12, download profiles, set BUILD_CERT_P12_B64 /
  BUILD_CERT_PASSWORD / PROVISIONING_PROFILES_B64 secrets).

Requires the three new secrets before the next build will sign.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 31, 2026

Warning

Review limit reached

@MatheusKindrazki, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 25 minutes and 12 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1e232135-2b19-4c99-a0a0-1b3fe289db6a

📥 Commits

Reviewing files that changed from the base of the PR and between a9e7f53 and 6923e85.

📒 Files selected for processing (5)
  • .github/actions/setup-apple-signing/action.yml
  • .github/workflows/apple-production.yml
  • .github/workflows/apple-release.yml
  • apple/ExportOptions.plist
  • docs/ops/ci-signing-setup.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ci-persistent-signing

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@MatheusKindrazki MatheusKindrazki merged commit 7204483 into main May 31, 2026
4 checks passed
@MatheusKindrazki MatheusKindrazki deleted the fix/ci-persistent-signing branch May 31, 2026 15:55
MatheusKindrazki added a commit that referenced this pull request May 31, 2026
…locally)

The CI-signing PR (#34) flipped apple/ExportOptions.plist to manual, but the
real release path is fastlane beta_all run LOCALLY (see fastlane/report.xml
2026-05-30), and that lane consumes this same ExportOptions.plist (Fastfile
EXPORT_OPTIONS_PATH). Manual signing would break the working local release, so
restore automatic. The CI workflows were never the release path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant