@devries-cameron20 / t3code-1 / commits / 05b7226776
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

perf(release): fetch the nightly Android APK in a background step (#31949)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Theo Browne committed Nov 6, 2026 at 13:08 UTC 05b72267769fdcf4ddfdef476375916ea165c8f2
2 files changed +32 -19
.github/workflows/release.yml
+29 -16
@@ -806,6 +806,24 @@ jobs:
806 with:
807 install-args: --filter=@t3tools/scripts...
808
809 + # Overlaps the artifact downloads. The wait below ends it before any
810 + # workspace script runs, so the Play key lives only in this process.
811 + # `exec` lets the runner's stop signals reach node directly.
812 + - id: android_apk
813 + name: Download nightly Android APK
814 + if: needs.preflight.outputs.release_channel == 'nightly'
815 + background: true
816 + continue-on-error: true
817 + timeout-minutes: 5
818 + env:
819 + GOOGLE_PLAY_SERVICE_ACCOUNT_JSON: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }}
820 + PACKAGE_NAME: com.t3tools.t3code
821 + APK_OUTPUT_DIR: ${{ runner.temp }}/android-apk
822 + run: |
823 + if [ -n "$GOOGLE_PLAY_SERVICE_ACCOUNT_JSON" ]; then
824 + exec node .github/scripts/mirror-play-apk.cjs
825 + fi
826 +
827 - name: Download all desktop artifacts
828 uses: actions/download-artifact@v8
829 with:
@@ -820,18 +838,6 @@ jobs:
838 merge-multiple: true
839 path: release-assets
840
823 - - name: Download internal Android APK for Nightly
824 - if: needs.preflight.outputs.release_channel == 'nightly'
825 - continue-on-error: true
826 - env:
827 - GOOGLE_PLAY_SERVICE_ACCOUNT_JSON: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }}
828 - PACKAGE_NAME: com.t3tools.t3code
829 - APK_OUTPUT_DIR: release-assets
830 - run: |
831 - if [ -n "$GOOGLE_PLAY_SERVICE_ACCOUNT_JSON" ]; then
832 - node .github/scripts/mirror-play-apk.cjs
833 - fi
834 -
841 # Installers verify archives against this file, so it is written from the
842 # signed bytes that get uploaded, never from an earlier stage.
843 - name: Write CLI archive checksums
@@ -848,6 +854,10 @@ jobs:
854 sha256sum "${archives[@]}" > SHA256SUMS
855 cat SHA256SUMS
856
857 + # Always runs, even after a failed step, and keeps that failure.
858 + - name: Wait for nightly Android APK
859 + wait: android_apk
860 +
861 # The desktop build omits the publish config for preview versions, so
862 # electron-builder emits no updater manifests for them. Refuse to publish
863 # if one shows up anyway: a `latest*.yml` or `nightly*.yml` on a preview
@@ -913,10 +923,13 @@ jobs:
923 echo 'release-assets/*.yml'
924 fi
925 echo 'release-assets/*.tar.gz'
916 - # Only list APKs when Play has a processed internal build available.
917 - for apk in release-assets/*.apk; do
918 - [[ -f "$apk" ]] && echo "$apk"
919 - done
926 + # A failed or timed-out fetch can leave partial bytes, so list the APK
927 + # only when this attempt's fetch succeeded and Play had one ready.
928 + if [[ "${{ steps.android_apk.outcome }}" == "success" ]]; then
929 + for apk in "$RUNNER_TEMP"/android-apk/*.apk; do
930 + [[ -f "$apk" ]] && echo "$apk"
931 + done
932 + fi
933 echo 'release-assets/SHA256SUMS'
934 echo 'EOF'
935 } >> "$GITHUB_OUTPUT"
docs/operations/release.md
+3 -3
@@ -342,9 +342,9 @@ uploads resume on the next check.
342
343 Normal Nightly releases include the newest processed internal-testing APK available
344 when the release publishes. Internal builds do not create separate Android releases.
345 -If Play credentials or a processed APK are unavailable, the Nightly can still publish
346 -without an APK. Android submissions continue to go to internal testing; promote a
347 -build to Alpha to publish it as a beta.
345 +If Play credentials or a processed APK are unavailable, or the download takes more
346 +than five minutes, the Nightly can still publish without an APK. Android submissions
347 +continue to go to internal testing; promote a build to Alpha to publish it as a beta.
348
349 The APK is the universal APK Play generates and signs from the
350 uploaded bundle, so no signing key lives in GitHub. The job skips itself until