- cacheStories() runs in Task.detached with a background ModelContext - persistQuickCache() encodes 100 stories off-thread via Task.detached - loadSectionSupplements() batches 5 parallel fetches into one sectionSupplement write Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
66 lines
2.0 KiB
YAML
66 lines
2.0 KiB
YAML
# Triggers on merge to main. Archives the app and exports an IPA.
|
|
# TestFlight upload requires three secrets set in:
|
|
# Gitea → Repository Settings → Actions → Secrets
|
|
#
|
|
# ASC_KEY_ID — App Store Connect API key ID (e.g. ABC123DEFG)
|
|
# ASC_ISSUER_ID — Issuer ID from App Store Connect → Users → API Keys
|
|
# ASC_PRIVATE_KEY — Full contents of the downloaded .p8 file
|
|
#
|
|
# The runner Mac must have the distribution certificate and team K8BLMMR883
|
|
# provisioning profile in its keychain (set up once in Xcode on that machine).
|
|
name: Release
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
archive:
|
|
name: Archive & Export IPA
|
|
runs-on: [self-hosted, macos]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Xcode version
|
|
run: xcodebuild -version
|
|
|
|
- name: Install XcodeGen
|
|
run: brew list xcodegen &>/dev/null || brew install xcodegen
|
|
|
|
- name: Generate Xcode project
|
|
run: xcodegen generate
|
|
|
|
- name: Archive (Release, device)
|
|
run: |
|
|
set -o pipefail
|
|
xcodebuild archive \
|
|
-project Jarvis.xcodeproj \
|
|
-scheme Jarvis \
|
|
-configuration Release \
|
|
-sdk iphoneos \
|
|
-archivePath build/Jarvis.xcarchive \
|
|
DEVELOPMENT_TEAM=K8BLMMR883
|
|
|
|
- name: Export IPA
|
|
run: |
|
|
set -o pipefail
|
|
xcodebuild -exportArchive \
|
|
-archivePath build/Jarvis.xcarchive \
|
|
-exportPath build/ipa \
|
|
-exportOptionsPlist ExportOptions.plist
|
|
|
|
- name: Upload to TestFlight
|
|
env:
|
|
ASC_KEY_ID: ${{ secrets.ASC_KEY_ID }}
|
|
ASC_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }}
|
|
ASC_PRIVATE_KEY: ${{ secrets.ASC_PRIVATE_KEY }}
|
|
run: |
|
|
echo "$ASC_PRIVATE_KEY" > /tmp/AuthKey_${ASC_KEY_ID}.p8
|
|
xcrun altool --upload-app \
|
|
--type ios \
|
|
--file build/ipa/Jarvis.ipa \
|
|
--apiKey "$ASC_KEY_ID" \
|
|
--apiIssuer "$ASC_ISSUER_ID"
|
|
rm -f /tmp/AuthKey_${ASC_KEY_ID}.p8
|