@devries-cameron20 / t3code-1 / commits / 2577baf8b0
Fork 0

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

fix(mobile): publish each Android beta only once

Julius Marminge committed Oct 15, 2026 at 23:20 UTC 2577baf8b0dc541283fa93d6919b0e354effadf4
4 files changed +15 -34
.github/scripts/mirror-play-apk.cjs
+9 -27
@@ -164,25 +164,15 @@ async function main() {
164 }
165 const safeName = build.versionName.replace(/[^0-9A-Za-z.]+/g, "-").replace(/^-|-$/g, "");
166 const apkName = `t3code-android-${channel}-${safeName}-${build.versionCode}.apk`;
167 - const tag = outputDirectory ? undefined : requireEnv("RELEASE_TAG");
168 - const snapshotTag = `android-beta-${build.versionCode}`;
169 - const release = tag ? readRelease(tag) : undefined;
170 - const snapshot = tag ? readRelease(snapshotTag) : undefined;
171 - const hasApk = (value) =>
172 - value &&
173 - !value.isDraft &&
174 - value.assets.some(
167 + const tag = `android-beta-${build.versionCode}`;
168 + const release = outputDirectory ? undefined : readRelease(tag);
169 + if (
170 + release &&
171 + !release.isDraft &&
172 + release.assets.some(
173 (asset) => asset.name === apkName && asset.state === "uploaded" && asset.size > 0,
176 - );
177 - const pruneBetaAssets = () => {
178 - for (const stale of release?.assets ?? []) {
179 - if (stale.name.endsWith(".apk") && stale.name !== apkName) {
180 - gh("release", "delete-asset", tag, stale.name, "--yes");
181 - }
182 - }
183 - };
184 - if (hasApk(release) && hasApk(snapshot)) {
185 - pruneBetaAssets();
174 + )
175 + ) {
176 console.log(`${apkName} is already published.`);
177 return;
178 }
@@ -209,16 +199,8 @@ async function main() {
199 "",
200 "These builds have been promoted for wider testing, but may still contain bugs. The beta is optional; the store app also works with Nightly servers.",
201 ].join("\n");
212 - // Publish the versioned beta first, then advance the stable download page.
202 // The build number makes retries and unchanged hourly checks idempotent.
214 - publishBeta(
215 - snapshotTag,
216 - apkPath,
217 - notes,
218 - `Android beta ${build.versionName} (${build.versionCode})`,
219 - );
220 - publishBeta(tag, apkPath, notes, "T3 Code for Android (beta)");
221 - pruneBetaAssets();
203 + publishBeta(tag, apkPath, notes, `Android beta ${build.versionName} (${build.versionCode})`);
204 } finally {
205 fs.rmSync(path.dirname(apkPath), { recursive: true, force: true });
206 }
.github/workflows/mobile-android-apk.yml
+2 -3
@@ -1,7 +1,7 @@
1 name: Mobile Android APK
2
3 -# Checks closed testing hourly. New beta builds get a versioned prerelease and
4 -# update the android-beta download page. Unchanged checks publish nothing.
3 +# Checks closed testing hourly. Each new beta gets one versioned prerelease.
4 +# Unchanged checks publish nothing.
5 on:
6 schedule:
7 # Avoid minute zero, when GitHub scheduled jobs are busiest.
@@ -21,7 +21,6 @@ jobs:
21 contents: write
22 env:
23 PACKAGE_NAME: com.t3tools.t3code
24 - RELEASE_TAG: android-beta
24 steps:
25 - id: credentials
26 name: Check for Play credentials
docs/operations/release.md
+3 -3
@@ -321,9 +321,9 @@ unreleased major and get its first beta build approved.
321 ## Android APK mirror
322
323 `.github/workflows/mobile-android-apk.yml` checks the Google Play Alpha closed-testing
324 -track hourly. A new beta gets an `android-beta-<build-number>` prerelease and updates
325 -the `android-beta` download page. Both contain only the beta APK. Unchanged checks
326 -publish nothing, and interrupted draft uploads resume on the next check.
324 +track hourly. Each new beta gets one `android-beta-<build-number>` prerelease
325 +containing its APK. Unchanged checks publish nothing, and interrupted draft
326 +uploads resume on the next check.
327
328 Normal Nightly releases include the newest processed internal-testing APK available
329 when the release publishes. Internal builds do not create separate Android releases.
docs/user/install.md
+1 -1
@@ -118,7 +118,7 @@ The store apps work with both stable and Nightly servers. Test builds are option
118
119 - **iPhone and iPad:** TestFlight is invite-only.
120 - **Android:** download an APK from the
121 - [Android beta release](https://github.com/pingdotgg/t3code/releases/tag/android-beta).
121 + [Android beta releases](https://github.com/pingdotgg/t3code/releases?q=android-beta-).
122
123 If the app crashes during launch, open Settings → Diagnostics on the next launch
124 that succeeds. It lists startup crashes from the last 7 days with the error and