| 1 | name: Mobile Android APK |
| 2 | |
| 3 | # Publishes the newest nightly-compatible Android build as a sideloadable APK |
| 4 | # on the rolling "android-nightly" prerelease, for nightly users who can't join |
| 5 | # the Play testing group. Play re-signs uploaded bundles with the app signing |
| 6 | # key, so its universal APK matches the Play Store install and needs no signing |
| 7 | # secrets here. EAS submits asynchronously (--no-wait), so this polls Play |
| 8 | # instead of chaining off mobile-eas-production.yml; runs with nothing new exit |
| 9 | # early. |
| 10 | on: |
| 11 | schedule: |
| 12 | # Avoid minute zero, when GitHub scheduled jobs are busiest. |
| 13 | - cron: "23 * * * *" |
| 14 | workflow_dispatch: |
| 15 | |
| 16 | concurrency: |
| 17 | group: mobile-android-apk |
| 18 | cancel-in-progress: false |
| 19 | |
| 20 | jobs: |
| 21 | mirror: |
| 22 | name: Mirror Play APK |
| 23 | runs-on: blacksmith-2vcpu-ubuntu-2404 |
| 24 | timeout-minutes: 10 |
| 25 | permissions: |
| 26 | contents: write |
| 27 | env: |
| 28 | PACKAGE_NAME: com.t3tools.t3code |
| 29 | # eas.json submits v2-preview builds to this closed testing track; they |
| 30 | # speak the orchestration protocol nightly servers use, which the Play |
| 31 | # Store release can't. |
| 32 | PLAY_TRACK: v2 |
| 33 | RELEASE_TAG: android-nightly |
| 34 | steps: |
| 35 | - id: credentials |
| 36 | name: Check for Play credentials |
| 37 | env: |
| 38 | GOOGLE_PLAY_SERVICE_ACCOUNT_JSON: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }} |
| 39 | run: | |
| 40 | if [ -n "$GOOGLE_PLAY_SERVICE_ACCOUNT_JSON" ]; then |
| 41 | echo "present=true" >> "$GITHUB_OUTPUT" |
| 42 | else |
| 43 | echo "present=false" >> "$GITHUB_OUTPUT" |
| 44 | echo "GOOGLE_PLAY_SERVICE_ACCOUNT_JSON is not available; skipping APK mirror." |
| 45 | fi |
| 46 | |
| 47 | - name: Checkout |
| 48 | if: steps.credentials.outputs.present == 'true' |
| 49 | uses: actions/checkout@v6 |
| 50 | with: |
| 51 | sparse-checkout: .github/scripts |
| 52 | |
| 53 | - name: Mirror the newest APK |
| 54 | if: steps.credentials.outputs.present == 'true' |
| 55 | env: |
| 56 | GH_TOKEN: ${{ github.token }} |
| 57 | GH_REPO: ${{ github.repository }} |
| 58 | GOOGLE_PLAY_SERVICE_ACCOUNT_JSON: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }} |
| 59 | run: node .github/scripts/mirror-play-apk.cjs |