diff --git a/docs/en/fastlane.md b/docs/en/fastlane.md index 7eda3aa..e1a49e8 100644 --- a/docs/en/fastlane.md +++ b/docs/en/fastlane.md @@ -133,8 +133,18 @@ this lane uploads a new AAB and does not promote existing releases. | `validate_only` | `false`; accepts only `true` or `false` | `MEGAPROXY_RELEASE_DIR` overrides the default artifact directory. Relative file paths are resolved -from the repository root. Metadata, changelogs, images and screenshots are not uploaded; the -F-Droid listing under `fastlane/metadata/android` is left separate from Play listing management. +from the repository root. Google Play releases are named `Version `, for example +`Version 0.1.1`, using `app/build.gradle.kts`. Run the lane from the checkout/tag matching the AAB. + +Release notes are uploaded automatically from the existing English and Russian changelogs: +`fastlane/metadata/android/en-US/changelogs/.txt` and +`fastlane/metadata/android/ru-RU/changelogs/.txt`. Fastlane selects the files using the +version code returned by Google Play for the uploaded AAB (for example, `14000.txt` for 0.1.1). +Prepare both files with each release; their contents become the localized release notes. The lane +does not generate text from commits. See [Fastlane changelogs](https://docs.fastlane.tools/actions/upload_to_play_store/#changelogs-whats-new). + +Store listing text, images and screenshots are not uploaded. F-Droid and Google Play share the +release-note files, while Play listing management remains separate. The tag workflow publishes a GitHub Release and a Google Play internal draft. PR CI must not receive the Play JSON key or invoke `play_release`. diff --git a/docs/ru/fastlane.md b/docs/ru/fastlane.md index 429740a..5e45552 100644 --- a/docs/ru/fastlane.md +++ b/docs/ru/fastlane.md @@ -136,8 +136,18 @@ bundle exec fastlane android play_release track:production release_status:comple | `validate_only` | `false`; принимает только `true` или `false` | `MEGAPROXY_RELEASE_DIR` меняет каталог артефактов по умолчанию. Относительные пути считаются от -корня репозитория. Метаданные, changelog, изображения и скриншоты не загружаются; каталог F-Droid -`fastlane/metadata/android` остаётся отдельным от управления карточкой Play. +корня репозитория. Выпуски Google Play получают имя `Version `, например +`Version 0.1.1`, из `app/build.gradle.kts`. Запускайте lane из checkout/тега, соответствующего AAB. + +Примечания к выпуску автоматически загружаются из существующих changelog на английском и русском: +`fastlane/metadata/android/en-US/changelogs/.txt` и +`fastlane/metadata/android/ru-RU/changelogs/.txt`. Fastlane выбирает файлы по коду версии, +который Google Play вернул для загруженного AAB (например, `14000.txt` для 0.1.1). +Готовьте оба файла при каждом релизе: их содержимое становится локализованными примечаниями. +Lane не генерирует текст из коммитов. См. [changelog Fastlane](https://docs.fastlane.tools/actions/upload_to_play_store/#changelogs-whats-new). + +Текст карточки магазина, изображения и скриншоты не загружаются. F-Droid и Google Play используют +общие файлы примечаний, а управление карточкой Play остаётся отдельным. Workflow по тегу публикует GitHub Release и internal-черновик Google Play. CI для PR не должен получать JSON-ключ Play или вызывать `play_release`. diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 2e484a1..663d97b 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -163,17 +163,22 @@ platform :android do UI.user_error!("aab must have the .aab extension") unless File.extname(files[:aab]) == ".aab" UI.user_error!("symbols must have the .zip extension") unless File.extname(files[:mapping]) == ".zip" + app_version = File.read(File.join(project_root, "app/build.gradle.kts"))[/^\s*versionName = "([^"]+)"/, 1] + UI.user_error!("Could not read versionName from app/build.gradle.kts") unless app_version + upload_to_play_store( **files, json_key_data: json_key_data, package_name: "net.megaproxy487", + version_name: "Version #{app_version}", + metadata_path: File.join(project_root, "fastlane/metadata/android"), track: track, release_status: release_status, validate_only: validate_only == "true", skip_upload_apk: true, skip_upload_aab: false, skip_upload_metadata: true, - skip_upload_changelogs: true, + skip_upload_changelogs: false, skip_upload_images: true, skip_upload_screenshots: true ) diff --git a/fastlane/README.md b/fastlane/README.md index 5fb7c21..7c6ff38 100644 --- a/fastlane/README.md +++ b/fastlane/README.md @@ -19,6 +19,7 @@ Fastlane is the supported entry point for tests and build artifacts. Install Rub The release lane deliberately delegates signing and artifact verification to the repository's existing release scripts. It requires the signing environment documented in the root README. `play_release` uploads an existing signed AAB and matching native symbols to Google Play. It -defaults to an internal draft and requires the JSON key contents in `SUPPLY_JSON_KEY_DATA`; see the setup guides below. +names releases `Version `, uploads English/Russian changelogs, defaults to an internal draft, +and requires the JSON key contents in `SUPPLY_JSON_KEY_DATA`; see the setup guides below. Full setup and CI scope rules: [English](../docs/en/fastlane.md) / [Русский](../docs/ru/fastlane.md).