FM-1 Flasher

GitHub Actions and Google Play

GitHub Actions — 0.10.2 / versionCode 42

OPERATION
Workflows support manual dispatch. Build and publication workflows also support
workflow_call, so the orchestrator uses exactly the same implementations.
After merging, choose Actions -> workflow -> Run workflow. For release operations,
select main as the workflow branch and enter the existing stable tag separately.
Tag creation alone does not trigger a release. No workflow in this workflow set
publishes the application to Google Play production automatically.

About shows the version from the installed package, the distribution or build
type and the build date in UTC. Gradle sets the metadata for local and CI
builds. F-Droid uses -Pfm1FdroidUpdates=true and Play uses
-Pfm1GooglePlayBuild=true. Nightly builds are identified by -Pfm1NightlyCode.

WORKFLOWS
android-debug.yml — Developer debug APK (test Firebase)
  Optional stable/preview tag matching versionName; empty uses the selected workflow
  commit. Environment android-debug. Preview tags may use v0.10.2-preview.1.
  Runs synthetic tests/lint without downloading firmware, builds with test Firebase
  and a persistent developer signing key.
  Artifact android-debug-<tag>, or android-debug-dev. No publication.

android-nightly.yml — Public GitHub nightly prerelease
  Runs nightly or by manual dispatch on the default branch. Reuses android-debug
  and its signing environment. Publishes the verified APK, debug-manifest.json
  and SHA256SUMS under a separate nightly-<versionCode> tag for each release.
  versionCode is 1000000 plus the nightly build number. The scheduled workflow
  starts at build number 3, after the initial previews. Only nightlies use
  this range. Debug builds offer the update when the signing key matches.
  Debug builds check every 15 minutes while open by default. Override at build
  time, for example with -Pfm1DebugAppUpdateMinutes=30 on :app:assembleDebug.

fdroid-release.yml — F-Droid signed APK
  Required stable tag. Environment fdroid-release. Requires official V15/V16
  integration tests on simulated flash, then tests/lints without analytics,
  rejects Firebase/Google Play services dependencies, inspects DEX, verifies APK
  identity and pinned signing certificate. Artifact android-fdroid-<tag>.

fdroid.yml — F-Droid validation (unsigned, no Firebase)
  Existing CI-style manual validation, with no signing secrets. Produces an
  unsigned APK, not a distribution release. The historical recipe in
  publication/fdroid/pl.ekim.fm1_flasher.yml is not used for publication.

google-play.yml — Google Play production AAB build
  Optional stable tag; empty uses the selected workflow commit. Environment
  google-play. Builds production Firebase AAB, checks its signature against
  PLAY_UPLOAD_CERT_SHA256. Artifact android-play-<tag>, or android-play-dev.
  Tagged builds require official V15/V16 integration tests.
  Does not upload. A branch build without a tag uses synthetic tests for validation.

android-publish.yml — Publish existing Android APKs
  Inputs: tag, fdroid_run_id, optional debug_run_id. Leaving debug_run_id empty
  publishes only F-Droid, independently of debug and Play. Run IDs can differ and
  refer to standalone build workflows or the combined android-release workflow.
  Requires successful source build jobs, verifies commit/tag/version/variant,
  certificate metadata and SHA-256. Debug and F-Droid must share a versionCode.
  Does not need Google Play artifacts or signing secrets. Creates a draft,
  uploads selected APKs, manifests and SHA256SUMS, then publishes. It resumes only a draft
  bound to the exact same manifests. Repeating publication of those exact files
  is a no-op; replacing an existing public release is rejected.

google-play-upload.yml — Google Play upload existing AAB (internal)
  Inputs: tag, run_id of a standalone Play build or combined release. Environment
  google-play-upload. Downloads/verifies the existing AAB, uploads to internal
  testing without rebuilding. Requires only the Play service account credential.
  Retry with the same input after a failed upload. If Play already accepted the
  versionCode, verify it in Play Console before retrying; Play can reject duplicate
  uploads. First-time app creation/initial manual upload may be required by Play.

promote-production.yml — Google Play production
  Inputs: version_code already tested on internal, tag and source build run_id.
  Verifies the existing bundle and its integration provenance before promotion. Environment
  google-play-production. Promotes existing bundle, with no build or re-upload.

android-release.yml — Android release (debug, F-Droid, Google Play)
  Required stable tag v<versionName>. Rejects an existing release/draft to avoid
  rebuilding an already prepared release. Resolves the tag to a single commit,
  invokes three independent builds in parallel and publishes APKs only after
  all succeed. AAB remains available as an artifact. Upload to Play is a separate
  explicit operation via google-play-upload.yml.

EXAMPLES
Complete release:
  gh workflow run android-release.yml --ref main -f tag=v0.10.2
Standalone builds:
  gh workflow run android-debug.yml --ref main -f tag=v0.10.2
  gh workflow run fdroid-release.yml --ref main -f tag=v0.10.2
  gh workflow run google-play.yml --ref main -f tag=v0.10.2
Independent F-Droid hotfix (use its actual build run ID):
  gh workflow run android-publish.yml --ref main -f tag=v0.10.2 -f fdroid_run_id=456
Experimental debug from a development branch (no public release):
  gh workflow run android-debug.yml --ref preview-branch
Publish standalone or recover failed publication (use actual run IDs):
  gh workflow run android-publish.yml --ref main -f tag=v0.10.2 -f debug_run_id=123 -f fdroid_run_id=456
Upload existing AAB (use actual run ID):
  gh workflow run google-play-upload.yml --ref main -f tag=v0.10.2 -f run_id=789
Find run IDs via Actions or gh run list. Individual reusable jobs inside a combined
release share the parent's run ID. Re-run failed jobs can preserve successful
builds; a fresh invocation of the orchestrator rebuilds all variants.

ENVIRONMENTS AND SECRETS
android-debug:
  FIREBASE_TEST_ANDROID_JSON; ANDROID_KEYSTORE_BASE64, ANDROID_KEYSTORE_PASSWORD,
  ANDROID_KEY_ALIAS, ANDROID_KEY_PASSWORD; DEBUG_APP_CERT_SHA256.
  Use a real test Firebase project and a persistent developer keystore.
fdroid-release:
  ANDROID_KEYSTORE_BASE64, ANDROID_KEYSTORE_PASSWORD, ANDROID_KEY_ALIAS,
  ANDROID_KEY_PASSWORD; FDROID_APP_CERT_SHA256. No Firebase credentials.
google-play:
  FIREBASE_PRODUCTION_ANDROID_JSON; ANDROID_KEYSTORE_BASE64,
  ANDROID_KEYSTORE_PASSWORD, ANDROID_KEY_ALIAS, ANDROID_KEY_PASSWORD;
  PLAY_UPLOAD_CERT_SHA256. This is the upload key, not necessarily Play's app key.
google-play-upload and google-play-production:
  GOOGLE_PLAY_SERVICE_ACCOUNT_JSON in each environment. No signing keystore.
All four ANDROID_* secret names are environment-scoped; their values can differ.
Use environment secrets, not repository-wide duplicates. Deployment restrictions
apply to the workflow's selected branch, not the tag field checked out by a step.
Debug is available on development branches. Production signing/upload workflows
use main as their workflow branch. Signing keys are never placed in artifacts
and temporary keystores/Firebase configuration are removed even after failure.
See fdroid/signing.md for key generation and backup instructions.

ARTIFACT IDENTITY AND RECOVERY
Each distribution artifact contains exactly the build file, manifest.json and
SHA256SUMS. Manifest records package, versionName, versionCode, source commit,
tag, variant, source run ID/attempt, certificate SHA-256 and binary SHA-256.
Tooling is checked out from the workflow's commit separately from application
source. Production source tags must include the firmwareIntegrationTest task and fixture manifest.
Source tags must be kept immutable. If a tag moves, publication/upload rejects
artifacts from the old commit. Branch-only builds cannot be published as stable
releases. Allocate monotonically increasing versionCodes for distribution updates.
F-Droid and Play may publish different versions on independent schedules. Manual
preview debug builds remain Actions artifacts.
Manifests and checksums supplement the successful trusted build job;
they are not a replacement for APK/AAB signing or a signed F-Droid index.
Artifacts are retained for 90 days; reports for 14. Recovery without rebuilding
requires artifacts to remain available. Preserve release APKs and keys separately.
Build concurrency is isolated per run; different tags do not block each other.
Same-tag publication is serialized; Play mutations share a separate group.
GitHub's default concurrency queue is not a durable FIFO: repeated pending requests
can replace older pending requests. Monitor dispatch results and retry as needed.

TEST FIXTURES AND CI
Ordinary CI, developer debug builds (including GitHub prereleases) and unsigned
F-Droid validation use deterministic synthetic packages/catalogs. They require no
firmware downloads and no FM1_FIXTURE_ARCHIVE_URL/SHA256 repository variables.

Tagged Google Play and signed F-Droid builds additionally require official V15/V16:
  python3 scripts/release_fixtures.py prepare
  ./gradlew --no-daemon -Pfm1Analytics=false :app:firmwareIntegrationTest
  python3 scripts/release_fixtures.py verify-integration
The task is excluded from ordinary testDebugUnitTest/testReleaseUnitTest runs.
Missing, changed or unavailable packages fail explicitly. The versioned manifest
scripts/firmware-fixtures.json pins product identities, HTTPS sources and SHA-256.
V15 is fetched at a fixed m-vave/fm1_open commit. The vendor V16 URL can change;
if it does, inspect the replacement and review a manifest update rather than
accepting the new bytes automatically. No firmware binaries are committed or
redistributed in the application or release artifacts.

Integration exercises both real package parsers, V15 recovery on simulated flash
for both supported chip IDs, protected data preservation and refusal of V16 by
V15-only recovery. It does not validate physical USB transport or instrument boot.
Production artifact manifests embed the tested commit and both package hashes;
publication, Play upload and promotion reject missing or mismatched evidence.
Preserve the corresponding source Actions artifact for later production promotion.

Synthetic verification still rejects missing/empty suites, failures and skips:
  python3 scripts/release_fixtures.py verify
android-ci.yml validates release tooling with unit tests and actionlint without
signing secrets, alongside existing Android tests and compilation checks.

PAGES AND F-DROID REPOSITORY
The Pages workflow can include a signed F-Droid index and APK alongside the site.
See fdroid/repository.md for setup, signing key backup and release updates.

Awesome FM-1

Discover community firmware, projects and resources for the M-VAVE FM-1.

Explore Awesome FM-1