From cc14373575a844458737ac6f0a6e8d8ea783ce75 Mon Sep 17 00:00:00 2001 From: Lei Nelissen Date: Mon, 10 Apr 2023 17:10:12 +0200 Subject: [PATCH] feat: setup Fastlane for Google Play Store --- .gitignore | 3 ++- android/app/build.gradle | 10 +++++++++- fastlane/Appfile | 3 ++- fastlane/Fastfile | 21 ++++++++++++++++++++- fastlane/README.md | 16 ++++++++++++++++ 5 files changed, 49 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 43d7a2a..42df979 100644 --- a/.gitignore +++ b/.gitignore @@ -72,4 +72,5 @@ certificates/ sentry.properties screenshots -fastlane/Preview.html \ No newline at end of file +fastlane/Preview.html +fastlane/play-store-credentials.json \ No newline at end of file diff --git a/android/app/build.gradle b/android/app/build.gradle index 0edd2fb..6c4468f 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -217,6 +217,14 @@ android { keyAlias 'androiddebugkey' keyPassword 'android' } + release { + if (project.hasProperty('FINTUNES_UPLOAD_STORE_FILE')) { + storeFile file(FINTUNES_UPLOAD_STORE_FILE) + storePassword FINTUNES_UPLOAD_STORE_PASSWORD + keyAlias FINTUNES_UPLOAD_KEY_ALIAS + keyPassword FINTUNES_UPLOAD_KEY_PASSWORD + } + } } buildTypes { debug { @@ -225,7 +233,7 @@ android { release { // Caution! In production, you need to generate your own keystore file. // see https://reactnative.dev/docs/signed-apk-android. - signingConfig signingConfigs.debug + signingConfig signingConfigs.release minifyEnabled enableProguardInReleaseBuilds proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" } diff --git a/fastlane/Appfile b/fastlane/Appfile index ffd3547..47b3ade 100644 --- a/fastlane/Appfile +++ b/fastlane/Appfile @@ -1,4 +1,5 @@ package_name("nl.moeilijkedingen.jellyfinaudioplayer") app_identifier("nl.moeilijkedingen.jellyfinaudioplayer") apple_id("lei@moeilijkedingen.nl") -team_id("238P3C58WC") \ No newline at end of file +team_id("238P3C58WC") +json_key_file("./fastlane/play-store-credentials.json") \ No newline at end of file diff --git a/fastlane/Fastfile b/fastlane/Fastfile index d90757b..52e150e 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -44,6 +44,15 @@ platform :ios do ) upload_to_testflight() end + + lane :build do + build_app( + scheme: "Fintunes", + output_directory: "build", + workspace: "ios/Fintunes.xcworkspace", + export_method: "app-store", + ) + end after_all do build_number = get_build_number( @@ -101,8 +110,18 @@ platform :android do gradle_file: "android/app/build.gradle" ) gradle( - task: "assembleRelease", + task: "assemble", + build_type: "Release", project_dir: "android" ) end + + lane :release do + gradle( + task: "bundle", + build_type: 'Release', + project_dir: "android" + ) + upload_to_play_store + end end diff --git a/fastlane/README.md b/fastlane/README.md index 32a7f3b..a91abd5 100644 --- a/fastlane/README.md +++ b/fastlane/README.md @@ -31,6 +31,14 @@ For _fastlane_ installation instructions, see [Installing _fastlane_](https://do +### ios build + +```sh +[bundle exec] fastlane ios build +``` + + + ### ios screenshots ```sh @@ -52,6 +60,14 @@ For _fastlane_ installation instructions, see [Installing _fastlane_](https://do Generate beta build +### android release + +```sh +[bundle exec] fastlane android release +``` + + + ---- This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run.