feat: switch to Firebase OTA deployment, drop ios-deploy
Some checks failed
PR → Build → Firebase OTA → LGTM / Wait for LGTM comment (pull_request) Has been cancelled
PR → Build → Firebase OTA → LGTM / Build & Deploy to Firebase OTA (pull_request) Has been cancelled

This commit is contained in:
2026-06-26 21:48:07 +00:00
parent 6a659c41fa
commit 9b06c0ae5c

View File

@@ -1,15 +1,15 @@
# =============================================================================
# TabataGo — PR → Build → iPhone → Wait LGTM → Merge
# TabataGo — PR → Build → Archive → Firebase OTA → Wait LGTM → Merge
# =============================================================================
# Chaque PR déclenche ce workflow :
# 1. Build l'app sur le Runner Mac
# 2. Installe sur l'iPhone (OTA via réseau local ou VPN)
# 2. Archive → Export .ipa → Déploie via Firebase App Distribution
# 3. Poste un commentaire sur la PR
# 4. Attend un commentaire "LGTM" de Millian
# 5. Merge automatique
# =============================================================================
name: PR → iPhone → LGTM
name: PR → Build → Firebase OTA → LGTM
on:
pull_request:
@@ -26,7 +26,7 @@ jobs:
# ─── Build + Deploy ────────────────────────────────────────────────────────
build-deploy:
name: Build & Install on iPhone
name: Build & Deploy to Firebase OTA
runs-on: macos
timeout-minutes: 20
@@ -47,30 +47,40 @@ jobs:
cd tabatago-swift
xcodegen generate
- name: Install ios-deploy
run: brew install ios-deploy
- name: Install Firebase CLI
run: brew install firebase-cli
- name: Build & Install on iPhone
env:
IPHONE_UDID: ${{ secrets.IPHONE_UDID }}
- name: Archive app
run: |
cd tabatago-swift
# Build for device
xcodebuild build \
xcodebuild archive \
-scheme TabataGo \
-sdk iphoneos \
-destination "platform=iOS,id=${IPHONE_UDID}" \
-destination "generic/platform=iOS" \
-configuration Debug \
-archivePath ../build/TabataGo.xcarchive \
-allowProvisioningUpdates \
-derivedDataPath ../build \
CODE_SIGN_STYLE=Automatic \
2>&1 | tail -20
CODE_SIGN_STYLE=Automatic
# Install on connected iPhone
ios-deploy --bundle ../build/Build/Products/Debug-iphoneos/TabataGo.app --id ${IPHONE_UDID}
- name: Export IPA
run: |
xcodebuild -exportArchive \
-archivePath ../build/TabataGo.xcarchive \
-exportPath ../build/ \
-exportOptionsPlist ExportOptions.plist \
-allowProvisioningUpdates
echo "✅ App built for iPhone (UDID: ${IPHONE_UDID})"
- name: Deploy to Firebase App Distribution
env:
FIREBASE_APP_ID: ${{ secrets.FIREBASE_APP_ID }}
run: |
echo "${{ secrets.FIREBASE_SERVICE_ACCOUNT }}" | base64 -d > /tmp/firebase-key.json
export GOOGLE_APPLICATION_CREDENTIALS=/tmp/firebase-key.json
firebase appdistribution:distribute ../build/TabataGo.ipa \
--app "${FIREBASE_APP_ID}" \
--groups "millian-test" \
--release-notes "PR: ${{ github.event.pull_request.title }}"
rm /tmp/firebase-key.json
- name: Post "Ready to test" comment
env:
@@ -79,7 +89,7 @@ jobs:
run: |
PR="${{ github.event.pull_request.number }}"
REPO="${{ github.repository }}"
BODY="## 📱 Prêt à tester !\\n\\nL'app a été déployée sur ton iPhone.\\n\\n- Teste les changements\\n- Reply **LGTM** pour merger\\n- Reply **KO** pour bloquer"
BODY="## 📱 Prêt à tester !\\n\\nL'app a été déployée via Firebase App Distribution.\\n\\n- Teste les changements\\n- Reply **LGTM** pour merger\\n- Reply **KO** pour bloquer"
curl -s -X POST \
-H "Authorization: token ${GT_TOKEN}" \
-H "Content-Type: application/json" \