diff --git a/.github/workflows/development-build-phone-app.yml b/.github/workflows/development-build-phone-app.yml new file mode 100644 index 0000000..db81b73 --- /dev/null +++ b/.github/workflows/development-build-phone-app.yml @@ -0,0 +1,34 @@ +# Builds the development client "OpenClapper Dev" (org.openclapper.dev, moss icon): core's Build phone app +# workflow with variant dev on core's main (or the branch given), with the development environment. That +# environment holds the dev app's key (its upload key on Google Play) and the Play service account, so the +# build is a signed release build that keeps the dev launcher and menu (#22). The APK and the App Bundle are +# the run's artifacts for 3 days; with track: internal the bundle also goes to the dev app's internal track. +# It needs no server: the dev client loads the JavaScript, and with it the server's address, from Metro. +name: Development · Build phone app + +on: + workflow_dispatch: + inputs: + ref: + description: Branch, tag or commit of core to build + type: string + default: main + track: + description: Also upload the bundle to this Google Play track of the dev app + type: choice + options: [none, internal] + default: none + +permissions: + contents: read + +jobs: + build: + uses: OpenClapper-dev/core/.github/workflows/build-phone-app.yml@main + with: + path: core + variant: dev + track: ${{ inputs.track || 'none' }} + environment: development + ref: ${{ inputs.ref || 'main' }} + secrets: inherit diff --git a/README.md b/README.md index 57b69da..4d8aaeb 100644 --- a/README.md +++ b/README.md @@ -20,10 +20,9 @@ All manual, named by instance first: | **Staging · Deploy server** | the same for staging, on core's `main` or a `ref` | | **Staging · Build phone app** | "OpenClapper Staging", APK + App Bundle; `track: internal` uploads to Play | | **Staging · Recreate from production** | staging rebuilt as a copy of production (production only read), then deployed | +| **Development · Build phone app** | the dev client "OpenClapper Dev", APK + App Bundle; `track: internal` uploads to Play | | **Grafana · Sync** | the monitoring dashboards, alert rules and their Cloudflare data source to the Grafana Cloud stack ([grafana/](grafana/README.md)) | -The development client is not built here: it needs no deployment (core's Build phone app, `variant: dev`). - ## Release (one button) Actions → **Production · Release** → Run workflow puts the newest release of the public repository live: @@ -86,6 +85,17 @@ only changes the version. Rolling staging back is the same step with an older ta is the build time, so the older build still arrives on the phone as an update. Staging's database keeps its newer schema (migrations only add). +## Development client + +**Development · Build phone app** builds "OpenClapper Dev" (`org.openclapper.dev`, moss icon) from core's +`main` (or the `ref` given): the app with its native modules and Expo's dev launcher, loading the +JavaScript from Metro (`make mobile` in core). It needs no server and no instance; its settings are the +`development` GitHub environment, which holds the dev app's key and its Play service account. With +`track: internal` the bundle goes to the dev app's internal track, so after a native change the phone +gets the new client from Play instead of a copied APK (#22). Its version code is the build time, like +staging's. Core's `make dev-build` stays for quick native iterations: it builds "OpenClapper Dev Local" +(`org.openclapper.dev.local`, debug-signed), which installs next to the Play app. + ## Settings Shared secrets (Settings → Secrets and variables → Actions), used by both instances: @@ -121,12 +131,15 @@ The `monitoring` environment (Settings → Environments, `main` only) holds Graf Grafana · Sync only: the variable `GRAFANA_URL` and the secrets `GRAFANA_TOKEN` (a service account of the stack) and `CF_GRAFANA_TOKEN` (a read-only Cloudflare analytics token). Setup in [grafana/](grafana/README.md#setting-it-up). -Per environment, `production` and `staging` each have their own secrets for the phone app: the Android +The `development` environment (Settings → Environments, `main` only) holds only the dev client's phone +app secrets below; no variables, since the dev client has no server of its own. + +Per environment, `production`, `staging` and `development` each have their own secrets for the phone app: the Android key (`ANDROID_KEYSTORE_BASE64`, `ANDROID_KEYSTORE_PASSWORD`, `ANDROID_KEY_ALIAS`, `ANDROID_KEY_PASSWORD`; the app's upload key on Google Play, which signs with a Google-generated key) and -`PLAY_SERVICE_ACCOUNT_JSON` (the key of that app's own service account, `play-uploader-production` or -`play-uploader-staging`, invited in the Play Console on its own app only, "Release apps to testing -tracks"). Copies of all keys are in the owner's Bitwarden, nowhere else. A lost upload key can be reset +`PLAY_SERVICE_ACCOUNT_JSON` (the key of that app's own service account, `play-uploader-production`, +`play-uploader-staging` or `play-uploader-development`, invited in the Play Console on its own app only, +"Release apps to testing tracks"). Copies of all keys are in the owner's Bitwarden, nowhere else. A lost upload key can be reset through Play Console support; a lost service account key is replaced by a new key on the account. ## Updating diff --git a/docs/instance.md b/docs/instance.md index 5aaa351..0449a51 100644 --- a/docs/instance.md +++ b/docs/instance.md @@ -32,6 +32,7 @@ After a clone, staging holds production's accounts and password hashes (sessions ## History +- 2026-11-12: Development · Build phone app (#22): the dev client "OpenClapper Dev" (`org.openclapper.dev`) for Google Play's internal track, from the `development` environment (its own key and service account `play-uploader-development`, still to be set up). The Play app, its first bundle and the tester are set up by hand. - 2026-10-28: Grafana monitoring (#15): Traffic and Platform dashboards and three production alerts, generated in `grafana/` and pushed by Grafana · Sync from the `monitoring` environment. - 2026-10-23: Google Play. Both apps on the internal track (first bundles by hand: staging 407, production 11000), uploads from Build APK verified (staging 410). New keys per environment; no key is kept on the owner's machine any more. - 2026-10-23: v0.10.0. Production moved to the `production` GitHub environment; `deploy.env` and the last repository variable (`APP_URL`) are gone (#7). Access app renamed "OpenClapper Admin". The owner plans new signing keys for production and staging (the old one is `CN=Fielder`); installs from the old key are replaced once. @@ -49,4 +50,4 @@ After a clone, staging holds production's accounts and password hashes (sessions ## Settings -The `production` and `staging` GitHub environments of this repository (README.md). Nothing local. +The `production`, `staging` and `development` GitHub environments of this repository (README.md). Nothing local.