4.9 KiB
fastlane setup (OpenClaw Android)
Install:
brew install fastlane
Create a Google Play service account JSON key with Google Play Developer API access, then grant that service account access to the OpenClaw app in Play Console.
Recommended local auth:
GOOGLE_PLAY_JSON_KEY=/absolute/path/to/google-play-service-account.json
Optional app targeting:
GOOGLE_PLAY_PACKAGE_NAME=ai.openclaw.app
Android release signing uses the same private apps-signing repository and MATCH_PASSWORD secret as iOS, but with Android-specific encrypted assets. Pull the shared upload key before release validation:
pnpm android:release:signing:plan
MATCH_PASSWORD=<signing repo password> pnpm android:release:signing:sync:pull
MATCH_PASSWORD=<signing repo password> pnpm android:release:signing:check
The pull command materializes decrypted signing files under apps/android/build/release-signing/, which is gitignored. Later Fastlane release commands reload those materialized values and export them to Gradle for the current process.
For the first setup or rotation, provide the Play upload keystore and a local signing properties file, then push encrypted assets to apps-signing:
MATCH_PASSWORD=<signing repo password> \
OPENCLAW_ANDROID_UPLOAD_KEYSTORE=<path-to-upload-keystore.jks> \
OPENCLAW_ANDROID_SIGNING_PROPERTIES=<path-to-android-signing.properties> \
pnpm android:release:signing:sync:push
The source signing properties file must contain:
OPENCLAW_ANDROID_STORE_PASSWORD=<store-password>
OPENCLAW_ANDROID_KEY_ALIAS=<upload-key-alias>
OPENCLAW_ANDROID_KEY_PASSWORD=<key-password>
Store the Google Play upload key, not the irreplaceable app signing key, when Play App Signing is enabled.
Validate auth:
cd apps/android
fastlane android auth_check
Archive locally without upload:
pnpm android:release:archive
Generate deterministic Google Play screenshots:
ANDROID_SCREENSHOT_AVD=OpenClaw_QA_API35 pnpm android:screenshots
If exactly one ADB device is already connected, pnpm android:screenshots
uses it. With ANDROID_SCREENSHOT_AVD or --avd <name>, the script can boot a
headless emulator, wait for boot completion, stabilize animation settings,
capture screenshots, and shut down only the emulator it started.
Upload metadata, release notes, and the Play AAB to the internal testing track:
pnpm android:release:upload
Direct Fastlane entry point:
cd apps/android
fastlane android release_upload
Release rules:
apps/android/version.jsonis the pinned Android release version source.apps/android/Config/Version.propertiesis generated from that source and read by Gradle.apps/android/CHANGELOG.mdis the Android-only changelog and release-note source.apps/android/fastlane/metadata/android/en-US/release_notes.txtis generated from that changelog bypnpm android:version:sync.apps/android/Config/ReleaseSigning.jsonpins the encrypted Android signing assets in the shared signing repo.MATCH_PASSWORDenables Fastlane to pull encrypted Android signing assets intoapps/android/build/release-signing/before release validation or archive builds.- Supported pinned Android versions use CalVer:
YYYY.M.D. versionCodeusesYYYYMMDDNN, whereNNis a two-digit build number for the pinned version.pnpm android:version:pin -- --from-gatewaypromotes the current root gateway version into the pinned Android release version.pnpm android:version:pin -- --version 2026.6.5 --version-code 2026060502increments another build on the same Android release train.pnpm android:version:syncupdates generated version artifacts.pnpm android:version:checkvalidates checked-in Android version artifacts.pnpm android:release:preflightvalidates Google Play auth, Android release signing, synced versioning, release notes, and prints the package/track/version/versionCode that will be uploaded.pnpm android:release:signing:sync:pullpulls encrypted Android signing assets fromapps-signing.pnpm android:release:signing:sync:pushcreates or refreshes encrypted Android signing assets inapps-signing.pnpm android:screenshotsbuilds and installs the Play debug app, launches deterministic screenshot scenes, and captures raw PNGs.pnpm android:release:archivebuilds the signed Play AAB and third-party APK intoapps/android/build/release-artifacts/.pnpm android:release:uploaduploads the Play AAB to the configured Google Play track. The default track isinternal.- Production promotion remains manual in Google Play Console.
Screenshots:
- Android screenshot capture writes raw Play screenshots under
apps/android/fastlane/metadata/android/<locale>/images/phoneScreenshots/. - Set
SUPPLY_UPLOAD_SCREENSHOTS=1to include those screenshots infastlane android metadata. - Do not commit generated screenshot captures unless they become intentional store metadata assets.