Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

fix(native-release): let a held back APK go out by hand from its release tag

Maurice4705d88933a7
diff --git a/scripts/ci/android-apk-release.mjs b/scripts/ci/android-apk-release.mjs
index 19dd3f412..87b1def66 100644
--- a/scripts/ci/android-apk-release.mjs
+++ b/scripts/ci/android-apk-release.mjs
@@ -55,9 +55,12 @@ export function mayPublish(appMinimum, released) {
return released >= appMinimum;
}
-/** Whether the run was started by pushing a release tag, not a prerelease tag or by hand. */
+/**
+ * Whether the run builds a release tag: pushed, or started by hand on that tag
+ * to publish an APK held back at the release. Never a prerelease tag or a branch.
+ */
export function isReleaseRun(eventName, ref) {
- return eventName === 'push' && /^refs\/tags\/v\d+\.\d+\.\d+$/.test(ref ?? '');
+ return ['push', 'workflow_dispatch'].includes(eventName) && /^refs\/tags\/v\d+\.\d+\.\d+$/.test(ref ?? '');
}
function guard(releasedFeatures) {
diff --git a/scripts/ci/android-apk-release.test.mjs b/scripts/ci/android-apk-release.test.mjs
index 40798b46a..ef1bfa8cf 100644
--- a/scripts/ci/android-apk-release.test.mjs
+++ b/scripts/ci/android-apk-release.test.mjs
@@ -31,7 +31,8 @@ describe('android-apk-release', () => {
assert.equal(isReleaseRun('push', 'refs/tags/v5.2.2'), true);
assert.equal(isReleaseRun('push', 'refs/tags/v5.2.2-tf.1'), false);
assert.equal(isReleaseRun('push', 'refs/heads/dev'), false);
- assert.equal(isReleaseRun('workflow_dispatch', 'refs/tags/v5.2.2'), false);
+ assert.equal(isReleaseRun('workflow_dispatch', 'refs/tags/v5.2.2'), true);
+ assert.equal(isReleaseRun('workflow_dispatch', 'refs/tags/v5.2.2-tf.1'), false);
assert.equal(isReleaseRun('workflow_dispatch', 'refs/heads/dev'), false);
assert.equal(isReleaseRun('push', undefined), false);
});
diff --git a/wiki/Native-Apps.md b/wiki/Native-Apps.md
index 9913e1496..d945f08ae 100644
--- a/wiki/Native-Apps.md
+++ b/wiki/Native-Apps.md
@@ -123,7 +123,7 @@ The apps are built from `client/`: Capacitor wraps the address screen in `client
- **Every pull request** that touches the native code runs `.github/workflows/native.yml`: an unsigned Android debug and release build (the release build runs R8 with `client/android/app/proguard-rules.pro`), an iOS simulator build with Xcode 26, and a check of the store texts and images.
- **A release** runs `.github/workflows/native-release.yml`, by hand (choose the Play track) or on a `v*` tag. A tag pushed by another workflow with the default token does not start it, so after a release run it by hand on the tag. It builds the signed Android App Bundle and sends it to the chosen Google Play testing track as a draft, and archives the iOS app and uploads it to App Store Connect, where it appears in TestFlight. Promoting a build to production happens in the two consoles.
- **Version numbers**: both stores get the version from `client/package.json` without a prerelease suffix, and the workflow run number plus 1000 as the build number. A prerelease reuses its version with a higher build number and stays on the internal track and in TestFlight.
-- **The APK outside Google Play**: after the upload, the same job fetches the universal APK Google Play builds of that bundle (signed with the Play app signing key) and publishes it to [liketrek/trek-android](https://github.com/liketrek/trek-android), one release per app version, a newer build of the same version replacing its APK. `scripts/ci/android-apk-release.mjs` holds a build back while the app needs a newer native API than the latest server release answers.
+- **The APK outside Google Play**: after the upload, the same job fetches the universal APK Google Play builds of that bundle (signed with the Play app signing key) and publishes it to [liketrek/trek-android](https://github.com/liketrek/trek-android), one release per app version, a newer build of the same version replacing its APK. `scripts/ci/android-apk-release.mjs` publishes only builds of a release tag vX.Y.Z (no TestFlight tags, no branches) and holds one back while the app needs a newer native API than the latest server release answers; a held build goes out later by starting the workflow by hand on its release tag.
- **The `store` environment** holds every secret and needs the approval of a required reviewer before a job starts. It only runs in liketrek/TREK, never for a pull request.
### Secrets in the `store` environment