Compare commits
3 Commits
a9eda61967
...
de63ae0546
| Author | SHA1 | Date | |
|---|---|---|---|
| de63ae0546 | |||
| 7d9a89e637 | |||
| 97b61d3afb |
@@ -1,8 +1,8 @@
|
||||
# =============================================================================
|
||||
# TabataGo — PR → Build → Archive → Firebase OTA → Wait LGTM → Merge
|
||||
# TabataGo — PR → Build → WiFi/USB Direct Deploy → Wait LGTM → Merge
|
||||
# =============================================================================
|
||||
|
||||
name: PR → Build → Firebase OTA → LGTM
|
||||
name: PR → Build → WiFi/USB Deploy → LGTM
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
@@ -16,14 +16,14 @@ permissions:
|
||||
jobs:
|
||||
|
||||
build-deploy:
|
||||
name: Build & Deploy to Firebase OTA
|
||||
name: Build & Deploy to iPhone (WiFi/USB)
|
||||
runs-on: macos
|
||||
timeout-minutes: 20
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
run: |
|
||||
git clone --depth 1 -b ${{ github.head_ref }} https://x-access-token:${PR_TOKEN}@gitea.1000co.fr/${REPO}.git .
|
||||
git clone --depth 1 -b ${{ github.head_ref }} https://x-access-token:${PR_TOKEN}@gitea.1000co.fr/${{ github.repository }}.git .
|
||||
env:
|
||||
PR_TOKEN: ${{ secrets.PR_API_TOKEN }}
|
||||
REPO: ${{ github.repository }}
|
||||
@@ -67,10 +67,9 @@ jobs:
|
||||
|
||||
echo "✅ Caches nettoyés"
|
||||
|
||||
- name: Install tools (xcodegen, node, firebase)
|
||||
- name: Install tools (xcodegen, node, ios-deploy)
|
||||
run: |
|
||||
brew install xcodegen node || true
|
||||
npm install -g firebase-tools
|
||||
brew install xcodegen node ios-deploy || true
|
||||
|
||||
- name: Generate Xcode project
|
||||
run: |
|
||||
@@ -87,7 +86,6 @@ jobs:
|
||||
- name: Build app
|
||||
run: |
|
||||
cd tabatago-swift
|
||||
xcodebuild -list
|
||||
xcodebuild build \
|
||||
-project TabataGo.xcodeproj \
|
||||
-scheme TabataGo \
|
||||
@@ -101,26 +99,29 @@ jobs:
|
||||
CODE_SIGN_STYLE=Automatic \
|
||||
DEVELOPMENT_TEAM=2MJF39L8VY
|
||||
|
||||
- name: Package IPA
|
||||
- name: Install to iPhone (WiFi → USB fallback)
|
||||
run: |
|
||||
cd tabatago-swift
|
||||
mkdir -p Payload build
|
||||
APP=$(find ../build/derived -name 'TabataGo.app' -type d | head -1)
|
||||
cp -R "$APP" Payload/
|
||||
zip -r build/TabataGo.ipa Payload/
|
||||
rm -rf Payload
|
||||
UDID="00008120-000925CE3672201E"
|
||||
APP=$(find build/derived -name 'TabataGo.app' -type d | head -1)
|
||||
|
||||
- name: Deploy to Firebase
|
||||
env:
|
||||
FIREBASE_APP_ID: ${{ secrets.FIREBASE_APP_ID }}
|
||||
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
|
||||
run: |
|
||||
npx firebase appdistribution:distribute tabatago-swift/build/TabataGo.ipa \
|
||||
--app "${FIREBASE_APP_ID}" \
|
||||
--groups "millian-test" \
|
||||
--project tabatago-19a80 \
|
||||
--token "${FIREBASE_TOKEN}" \
|
||||
--release-notes "PR: ${{ github.event.pull_request.title }}"
|
||||
# 1. Try WiFi first (Xcode 15+ devicectl network discovery)
|
||||
echo "📱 Trying WiFi install via devicectl..."
|
||||
xcrun devicectl device install app --device "$UDID" "$APP" 2>&1 | tail -3
|
||||
if [ ${PIPESTATUS[0]} -eq 0 ]; then
|
||||
echo "✅ Installed via WiFi"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# 2. Fallback to USB via ios-deploy
|
||||
echo "🔌 WiFi failed, trying USB..."
|
||||
ios-deploy --bundle "$APP" --id "$UDID" --justlaunch
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "✅ Installed via USB"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "❌ Install failed (both WiFi and USB)"
|
||||
exit 1
|
||||
|
||||
- name: Post "Ready to test" comment
|
||||
env:
|
||||
@@ -132,7 +133,7 @@ jobs:
|
||||
curl -s -X POST \
|
||||
-H "Authorization: token ${GT_TOKEN}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{\"body\":\"## 📱 Prêt à tester !\\n\\nL\'app est déployée via Firebase.\\n\\n- Teste les changements\\n- Reply **LGTM** pour merger\\n- Reply **KO** pour bloquer\"}" \
|
||||
-d "{\"body\":\"## 📱 Prêt à tester !\\n\\nL'app est déployée sur l'iPhone (USB/WiFi).\\n\\n- Teste les changements\\n- Reply **LGTM** pour merger\\n- Reply **KO** pour bloquer\"}" \
|
||||
"${GITEA_URL}/api/v1/repos/${REPO}/issues/${PR}/comments"
|
||||
|
||||
wait-approval:
|
||||
|
||||
Reference in New Issue
Block a user