# Fastlane configuration for the Google Play Store listing (Android). # # Manages the localized store metadata (title, descriptions, ...). The listing # text lives in the private `prop` submodule under # prop/store_metadata/android// so it is not exposed in the public repo. # The app binary (AAB) is still uploaded by the regular build workflow, so these # lanes never touch it. default_platform(:android) # fastlane chdir's into the fastlane/ folder before running a lane, so relative # paths resolve against android/fastlane/. Anchor everything at the repo root # instead (GITHUB_WORKSPACE in CI; two levels up from this file locally). ROOT = ENV["GITHUB_WORKSPACE"] || File.expand_path("../..", __dir__) PACKAGE_NAME = "de.jonasbark.swiftcontrol" JSON_KEY = ENV["SUPPLY_JSON_KEY_FILE"] || File.join(ROOT, "android/fastlane/service-account.json") METADATA = File.join(ROOT, "prop/store_metadata/android") # private submodule platform :android do desc "Upload the localized store listing texts & screenshots to Google Play (no binary, no changelogs)" lane :upload_metadata do upload_to_play_store( package_name: PACKAGE_NAME, json_key: JSON_KEY, metadata_path: METADATA, track: ENV["PLAY_TRACK"] || "production", skip_upload_apk: true, skip_upload_aab: true, # Feature graphic / icon are not managed here, only the localized # screenshots prepared by scripts/prepare_store_screenshots.sh. skip_upload_images: true, skip_upload_screenshots: false, # Release notes ("what's new") are handled per-release by the build # workflow, so we don't overwrite them when syncing the listing. skip_upload_changelogs: true, changes_not_sent_for_review: true, ) end desc "Download the current Google Play listing into prop/store_metadata/android" lane :download_metadata do require "fileutils" # `supply init` refuses to overwrite existing metadata (it just prints # "Metadata already exists ..." and downloads nothing), so clear the folder # first to re-pull the current live listing. FileUtils.rm_rf(METADATA) sh( "bundle", "exec", "fastlane", "supply", "init", "--json_key", JSON_KEY, "--package_name", PACKAGE_NAME, "--metadata_path", METADATA, ) end end