|
17 | 17 | - name: Setup Node.js |
18 | 18 | uses: actions/setup-node@v4 |
19 | 19 | with: |
20 | | - node-version: "18" |
| 20 | + node-version: "22" |
21 | 21 |
|
22 | 22 | - name: Install dependencies |
23 | 23 | run: npm install |
| 24 | + |
| 25 | + build-android: |
| 26 | + runs-on: ubuntu-latest |
| 27 | + needs: sanity-check |
| 28 | + |
| 29 | + steps: |
| 30 | + - name: Checkout repository |
| 31 | + uses: actions/checkout@v4 |
| 32 | + |
| 33 | + - name: Setup Node.js |
| 34 | + uses: actions/setup-node@v4 |
| 35 | + with: |
| 36 | + node-version: "22" |
| 37 | + |
| 38 | + - name: Setup Java |
| 39 | + uses: actions/setup-java@v4 |
| 40 | + with: |
| 41 | + distribution: "temurin" |
| 42 | + java-version: "17" |
| 43 | + |
| 44 | + - name: Setup Android SDK |
| 45 | + uses: android-actions/setup-android@v3 |
| 46 | + |
| 47 | + - name: Install dependencies |
| 48 | + run: npm install |
| 49 | + |
| 50 | + - name: Build web app |
| 51 | + run: npm run build |
| 52 | + |
| 53 | + - name: Sync Capacitor Android |
| 54 | + run: npx cap sync android |
| 55 | + |
| 56 | + - name: Build Android APK (debug) |
| 57 | + run: cd android && ./gradlew assembleDebug |
| 58 | + |
| 59 | + - name: Upload Android APK |
| 60 | + uses: actions/upload-artifact@v4 |
| 61 | + with: |
| 62 | + name: securecomm-android-debug |
| 63 | + path: android/app/build/outputs/apk/debug/app-debug.apk |
| 64 | + if-no-files-found: error |
| 65 | + |
| 66 | + build-ios: |
| 67 | + runs-on: macos-latest |
| 68 | + needs: sanity-check |
| 69 | + |
| 70 | + steps: |
| 71 | + - name: Checkout repository |
| 72 | + uses: actions/checkout@v4 |
| 73 | + |
| 74 | + - name: Setup Node.js |
| 75 | + uses: actions/setup-node@v4 |
| 76 | + with: |
| 77 | + node-version: "22" |
| 78 | + |
| 79 | + - name: Install dependencies |
| 80 | + run: npm install |
| 81 | + |
| 82 | + - name: Build web app |
| 83 | + run: npm run build |
| 84 | + |
| 85 | + - name: Sync Capacitor iOS |
| 86 | + run: npx cap sync ios |
| 87 | + |
| 88 | + - name: Build iOS app (simulator) |
| 89 | + run: | |
| 90 | + xcodebuild \ |
| 91 | + -project ios/App/App.xcodeproj \ |
| 92 | + -scheme App \ |
| 93 | + -sdk iphonesimulator \ |
| 94 | + -configuration Debug \ |
| 95 | + -derivedDataPath ios/build \ |
| 96 | + CODE_SIGN_IDENTITY="" \ |
| 97 | + CODE_SIGNING_REQUIRED=NO \ |
| 98 | + CODE_SIGNING_ALLOWED=NO \ |
| 99 | + -resolvePackageDependencies \ |
| 100 | + build |
| 101 | +
|
| 102 | + - name: Upload iOS app |
| 103 | + uses: actions/upload-artifact@v4 |
| 104 | + with: |
| 105 | + name: securecomm-ios-simulator |
| 106 | + path: ios/build/Build/Products/Debug-iphonesimulator/App.app |
| 107 | + if-no-files-found: error |
| 108 | + |
0 commit comments