From 293121dbba24b33f0dc48526dd7e5d0d74479522 Mon Sep 17 00:00:00 2001 From: Ian Maia Date: Wed, 29 Jul 2026 21:52:50 +0200 Subject: [PATCH 1/2] Add TV to Buildkite validation and artifacts --- .buildkite/commands/lint.sh | 7 ++++--- .buildkite/pipeline.yml | 10 ++++++++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.buildkite/commands/lint.sh b/.buildkite/commands/lint.sh index 3fe7fa10f58..3a685191c46 100755 --- a/.buildkite/commands/lint.sh +++ b/.buildkite/commands/lint.sh @@ -17,10 +17,10 @@ echo "--- ๐Ÿงน Linting" ./gradlew :app:lintRelease app_lint_exit_code=$? -./gradlew :automotive:lintRelease :wear:lintRelease -automotive_wear_lint_exit_code=$? +./gradlew :automotive:lintRelease :tv:lintRelease :wear:lintRelease +other_apps_lint_exit_code=$? -if [ $app_lint_exit_code -ne 0 ] || [ $automotive_wear_lint_exit_code -ne 0 ]; then +if [ $app_lint_exit_code -ne 0 ] || [ $other_apps_lint_exit_code -ne 0 ]; then lint_exit_code=1 else lint_exit_code=0 @@ -28,6 +28,7 @@ fi upload_sarif_to_github 'app/build/reports/lint-results-release.sarif' 'app' upload_sarif_to_github 'automotive/build/reports/lint-results-release.sarif' 'automotive' +upload_sarif_to_github 'tv/build/reports/lint-results-release.sarif' 'tv' upload_sarif_to_github 'wear/build/reports/lint-results-release.sarif' 'wear' exit $lint_exit_code diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 2d91b0c49bf..070e5e949fa 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -67,7 +67,7 @@ steps: artifact_paths: - "**/build/instrumented-tests/**/*" - - group: "Assemble release APKs" + - group: "Assemble Mobile, Automotive, TV, and Wear release APKs" steps: - label: "Assemble app release APK" command: ".buildkite/commands/assemble-release-apk.sh app" @@ -81,6 +81,12 @@ steps: artifact_paths: - "**/build/outputs/apk/**/*" + - label: "Assemble TV release APK" + command: ".buildkite/commands/assemble-release-apk.sh tv" + plugins: [ $CI_TOOLKIT ] + artifact_paths: + - "**/build/outputs/apk/**/*" + - label: "Assemble wear release APK" command: ".buildkite/commands/assemble-release-apk.sh wear" plugins: [ $CI_TOOLKIT ] @@ -90,7 +96,7 @@ steps: ########## # Optional Prototype Builds # - # Builds all modules, uploads app to FAD and Wear and Automotive to S3 + # Builds all modules, uploads app to FAD and Wear, Automotive, and TV to S3 ########## - group: Prototype Builds if: "build.pull_request.id != null || build.branch == 'main'" From 74fab6b95aa5c0f38bbb086b08d85bbcaaa36709 Mon Sep 17 00:00:00 2001 From: Ian Maia Date: Wed, 29 Jul 2026 21:53:08 +0200 Subject: [PATCH 2/2] Add TV to Android release automation --- fastlane/Fastfile | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index f499f6be336..7be5ad25330 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -19,6 +19,8 @@ RELEASE_NOTES_SOURCE_PATH = File.join(PROJECT_ROOT_FOLDER, 'CHANGELOG.md') EXTRACTED_RELEASE_NOTES_PATH = File.join(ORIGINALS_METADATA_DIR_PATH, 'release_notes.txt') PLAY_STORE_TRACK_AUTOMOTIVE_BETA = 'automotive:beta' PLAY_STORE_TRACK_AUTOMOTIVE_PRODUCTION = 'automotive:production' +PLAY_STORE_TRACK_TV_BETA = 'tv:beta' +PLAY_STORE_TRACK_TV_PRODUCTION = 'tv:production' PLAY_STORE_TRACK_WEAR_BETA = 'wear:beta' PLAY_STORE_TRACK_WEAR_PRODUCTION = 'wear:production' PLAY_STORE_TRACK_BETA = 'beta' @@ -66,8 +68,9 @@ ENV['SUPPLY_UPLOAD_MAX_RETRIES'] = '5' GITHUB_REPO = 'automattic/pocket-casts-android' APPS_APP = 'app' APPS_AUTOMOTIVE = 'automotive' +APPS_TV = 'tv' APPS_WEAR = 'wear' -APPS = [APPS_APP, APPS_AUTOMOTIVE, APPS_WEAR].freeze +APPS = [APPS_APP, APPS_AUTOMOTIVE, APPS_TV, APPS_WEAR].freeze UPLOAD_TO_PLAY_STORE_JSON_KEY = File.join(PROJECT_ROOT_FOLDER, 'google-upload-credentials.json') UPLOAD_TO_PLAY_STORE_COMMON_OPTIONS = { @@ -330,7 +333,8 @@ platform :android do end end - # Update the rollout of all 3 variants/form-factors (app, automotive, wear) of the latest builds of the given Google Play track to the given % value + # Update the rollout of all app variants/form factors for the latest builds of the + # given Google Play track to the given % value # # @param percent [Float] The rollout percentage, between 0 and 1 # @param track [String] The Google Play track for which to update the rollout of. Must be either `beta` or `production`. @@ -369,7 +373,12 @@ platform :android do not_found_variants.each do |message| UI.important(message) end - UI.user_error!('None of the 3 app variants were found in Google Play Console. We expected at least one') if not_found_variants.count == APPS.count + if not_found_variants.count == APPS.count + UI.user_error!( + "None of the #{APPS.count} app variants were found in Google Play Console. " \ + 'We expected at least one' + ) + end end # Downloads the latest translations from GlotPress and creates a PR to integrate them into the current `release/*` branch @@ -584,7 +593,7 @@ platform :android do # # @param version [String] The version to create # @param build_code [String] The build code to create - # @param app [String] The Android app to build (i.e 'app', 'automotive', or 'wear') + # @param app [String] The Android app to build (i.e. 'app', 'automotive', 'tv', or 'wear') lane :build_bundle do |app:, version: version_name_current, build_code: build_code_current| aab_artifact_path = aab_artifact_path(app, version) build_dir = 'artifacts/' @@ -598,6 +607,7 @@ platform :android do build_type: 'Release', properties: { 'IS_AUTOMOTIVE_BUILD' => app == APPS_AUTOMOTIVE, + 'IS_TV_BUILD' => app == APPS_TV, 'IS_WEAR_BUILD' => app == APPS_WEAR } ) @@ -635,7 +645,7 @@ platform :android do ) end - # Compiles prototype builds and uploads to FAD (app) and S3 (wear/automotive) + # Compiles prototype builds and uploads to FAD (app) and S3 (wear/automotive/TV) # lane :build_and_upload_prototype_build do firebase_account_key = ENV.fetch('FIREBASE_APP_DISTRIBUTION_ACCOUNT_KEY', nil) @@ -684,12 +694,12 @@ platform :android do ) end - # Build wear/automotive and upload to S3 (PRs only) + # Build wear/automotive/TV and upload to S3 (PRs only) next unless pr_number UI.user_error!("'BUILDKITE_ARTIFACTS_S3_BUCKET' must be defined as an environment variable.") unless ENV['BUILDKITE_ARTIFACTS_S3_BUCKET'] - other_platforms = %w[wear automotive] + other_platforms = %w[wear automotive tv] other_apks = [] other_platforms.each do |platform| @@ -748,7 +758,7 @@ platform :android do def get_app_display_name(apk_path:) key = get_app_key(apk_path: apk_path).to_sym - { app: '๐Ÿ“ฑ Mobile', wear: 'โŒš Wear', automotive: '๐Ÿš— Automotive' }.fetch(key, 'โ” Unknown') + { app: '๐Ÿ“ฑ Mobile', wear: 'โŒš Wear', automotive: '๐Ÿš— Automotive', tv: '๐Ÿ“บ TV' }.fetch(key, 'โ” Unknown') end # Mimics the subset of ActiveSupport's `String#parameterize` we rely on. @@ -936,7 +946,7 @@ platform :android do BUILD_CODE_FORMATTER.build_code(build_code: build_code_next) end - # Returns the versionCode for a given app, adjusting for offset depending if it's the mobile, automotive or wear app + # Returns the versionCode for a given app, adjusting for offset depending on its form factor # # See also `dependencies.gradle.kts` and its `versionCodeDifferenceBetweenAppAnd*` constants where those offsets are defined # @@ -946,6 +956,8 @@ platform :android do (version_code.to_i + 50_000).to_s when APPS_WEAR (version_code.to_i + 100_000).to_s + when APPS_TV + (version_code.to_i + 150_000).to_s else version_code end @@ -953,7 +965,7 @@ platform :android do # Returns the Play Store track for a given app, for Open Testing or Production # - # @param app [String] The type of app. One of `APPS_APP`, `APPS_AUTOMOTIVE`, `APPS_WEAR` + # @param app [String] The type of app. One of `APPS_APP`, `APPS_AUTOMOTIVE`, `APPS_TV`, `APPS_WEAR` # @param is_beta [Boolean] If we want the track for Open Testing. Otherwise, returns the track for Production # @return [String] The Play Store track to use in the `upload_to_play_store(track: โ€ฆ)` action call # @@ -963,6 +975,8 @@ platform :android do is_beta ? PLAY_STORE_TRACK_AUTOMOTIVE_BETA : PLAY_STORE_TRACK_AUTOMOTIVE_PRODUCTION when APPS_WEAR is_beta ? PLAY_STORE_TRACK_WEAR_BETA : PLAY_STORE_TRACK_WEAR_PRODUCTION + when APPS_TV + is_beta ? PLAY_STORE_TRACK_TV_BETA : PLAY_STORE_TRACK_TV_PRODUCTION else is_beta ? PLAY_STORE_TRACK_BETA : PLAY_STORE_TRACK_PRODUCTION end