fix(ci): replace Firebase OTA with USB direct deploy
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
# =============================================================================
|
||||
# TabataGo — PR → Build → Archive → Firebase OTA → Wait LGTM → Merge
|
||||
# TabataGo — PR → Build → USB Direct Deploy → Wait LGTM → Merge
|
||||
# =============================================================================
|
||||
|
||||
name: PR → Build → Firebase OTA → LGTM
|
||||
name: PR → Build → 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 via 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: |
|
||||
@@ -84,15 +83,13 @@ jobs:
|
||||
-project TabataGo.xcodeproj \
|
||||
-scmProvider system
|
||||
|
||||
- name: Archive app
|
||||
- name: Build app
|
||||
run: |
|
||||
cd tabatago-swift
|
||||
xcodebuild -list
|
||||
xcodebuild archive \
|
||||
xcodebuild build \
|
||||
-project TabataGo.xcodeproj \
|
||||
-scheme TabataGo \
|
||||
-configuration Release \
|
||||
-archivePath ../build/TabataGo.xcarchive \
|
||||
-configuration Debug \
|
||||
-allowProvisioningUpdates \
|
||||
-skipPackagePluginValidation \
|
||||
-derivedDataPath ../build/derived \
|
||||
@@ -102,27 +99,11 @@ jobs:
|
||||
CODE_SIGN_STYLE=Automatic \
|
||||
DEVELOPMENT_TEAM=2MJF39L8VY
|
||||
|
||||
- name: Export IPA (Ad Hoc)
|
||||
- name: Install to iPhone
|
||||
run: |
|
||||
cd tabatago-swift
|
||||
mkdir -p build
|
||||
xcodebuild -exportArchive \
|
||||
-archivePath ../build/TabataGo.xcarchive \
|
||||
-exportPath build \
|
||||
-exportOptionsPlist Config/exportOptions.plist \
|
||||
-allowProvisioningUpdates
|
||||
|
||||
- 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 }}"
|
||||
APP=$(find ../build/derived -name 'TabataGo.app' -type d | head -1)
|
||||
echo "📱 Installing $APP to iPhone..."
|
||||
ios-deploy --bundle "$APP" --id 00008120-000925CE3672201E --justlaunch
|
||||
|
||||
- name: Post "Ready to test" comment
|
||||
env:
|
||||
@@ -134,7 +115,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).\\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:
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>method</key>
|
||||
<string>ad-hoc</string>
|
||||
<key>teamID</key>
|
||||
<string>2MJF39L8VY</string>
|
||||
<key>compileBitcode</key>
|
||||
<false/>
|
||||
<key>signingStyle</key>
|
||||
<string>automatic</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Reference in New Issue
Block a user