diff --git a/.github/workflows/deploy_to_playstore_testflight.yml b/.github/workflows/deploy_to_playstore_testflight.yml index bba95de..7300e44 100644 --- a/.github/workflows/deploy_to_playstore_testflight.yml +++ b/.github/workflows/deploy_to_playstore_testflight.yml @@ -2,6 +2,11 @@ name: Deploy to Play Store Internal & TestFlight on: workflow_dispatch: + inputs: + skipBuildNumberIncrease: + description: 'Skip automatic build number increase' + type: boolean + default: false jobs: android-publish-to-play-store: @@ -64,7 +69,7 @@ jobs: CI_EVAL_ANDROID_KEYSTORE_KEY_PASSWORD: ${{ secrets.CI_EVAL_ANDROID_KEYSTORE_KEY_PASSWORD }} CI_EVAL_ANDROID_KEYSTORE_STORE_PASSWORD: ${{ secrets.CI_EVAL_ANDROID_KEYSTORE_STORE_PASSWORD }} working-directory: ./android - run: bundle exec fastlane deployProdToPlayStore + run: bundle exec fastlane deployProdToPlayStore skip_build_number_increase:${{ github.event.inputs.skipBuildNumberIncrease }} ios-publish-to-testflight: runs-on: macos-latest @@ -138,4 +143,4 @@ jobs: CI_EVAL_IOS_APP_STORE_KEY_ISSUER_ID: ${{ secrets.CI_EVAL_IOS_APP_STORE_KEY_ISSUER_ID }} CI_EVAL_PROD_APP_IDENTIFIER: ${{ secrets.CI_EVAL_PROD_APP_IDENTIFIER }} working-directory: ./ios - run: bundle exec fastlane deployToTestFlight + run: bundle exec fastlane deployToTestFlight skip_build_number_increase:${{ github.event.inputs.skipBuildNumberIncrease }} diff --git a/android/app/build.gradle b/android/app/build.gradle index 5460ef3..8e9089b 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -72,7 +72,7 @@ def jscFlavor = 'org.webkit:android-jsc:+' // custom properties def applicationIdArgument = project.findProperty('applicationId') -def applicationVersionCodeArgument = project.findProperty('versionCode')?.toInteger() +def applicationVersionCodeArgument = project.findProperty('versionCode')?.isInteger() ? project.findProperty('versionCode')?.toInteger() : null def useDebugSigningForReleaseBuild = project.findProperty('useDebugSigningForReleaseBuild')?.toBoolean() ?: false android { diff --git a/android/fastlane/Fastfile b/android/fastlane/Fastfile index c7bcfde..0347a32 100644 --- a/android/fastlane/Fastfile +++ b/android/fastlane/Fastfile @@ -74,13 +74,13 @@ platform :android do desc "By Default it sets the version_code to last from PlayStore + 1." desc ">Optionally version code increase can be skipped via:" desc "```sh" - desc "[bundle exec] fastlane deployProdToPlayStore skip_build_number_increase:1" + desc "[bundle exec] fastlane deployProdToPlayStore skip_build_number_increase:true" desc "```" lane :deployProdToPlayStore do |options| skip_build_number_increase = options[:skip_build_number_increase] # optional, if not set, it gets the last from PlayStore then adds + 1 package_name = PROD_APP_IDENTIFIER - if skip_build_number_increase.nil? + if skip_build_number_increase.nil? || !skip_build_number_increase last_version_codes = google_play_track_version_codes( track: 'internal', json_key: PLAY_STORE_AUTH_FILE, diff --git a/android/fastlane/README.md b/android/fastlane/README.md index 5a6833f..7a8f85b 100644 --- a/android/fastlane/README.md +++ b/android/fastlane/README.md @@ -41,6 +41,14 @@ Create new Release APK Find it under app/build/outputs/apk/release +### android testprop + +```sh +[bundle exec] fastlane android testprop +``` + + + ### android deployProdToPlayStore ```sh @@ -55,7 +63,7 @@ By Default it sets the version_code to last from PlayStore + 1. ```sh -[bundle exec] fastlane deployProdToPlayStore skip_build_number_increase:1 +[bundle exec] fastlane deployProdToPlayStore skip_build_number_increase:true ``` diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile index 927f5c5..1c005bd 100644 --- a/ios/fastlane/Fastfile +++ b/ios/fastlane/Fastfile @@ -80,7 +80,7 @@ platform :ios do desc "By Default it sets the version_code to last from TestFlight + 1." desc ">Optionally version code increase can be skipped via:" desc "```sh" - desc "[bundle exec] fastlane deployInternalFirebase skip_build_number_increase:1" + desc "[bundle exec] fastlane deployInternalFirebase skip_build_number_increase:true" desc "```" lane :deployToTestFlight do |options| skip_build_number_increase = options[:skip_build_number_increase] # optional, if not set, it gets the last from TestFlight then adds + 1 @@ -92,7 +92,7 @@ platform :ios do in_house: false # optional but may be required if using match/sigh ) - if skip_build_number_increase.nil? + if skip_build_number_increase.nil? || !skip_build_number_increase increment_build_number({ build_number: latest_testflight_build_number(app_identifier: PROD_APP_IDENTIFIER) + 1 }) diff --git a/ios/fastlane/README.md b/ios/fastlane/README.md index 1fb35b7..99e5fcb 100644 --- a/ios/fastlane/README.md +++ b/ios/fastlane/README.md @@ -45,7 +45,7 @@ By Default it sets the version_code to last from TestFlight + 1. ```sh -[bundle exec] fastlane deployInternalFirebase skip_build_number_increase:1 +[bundle exec] fastlane deployInternalFirebase skip_build_number_increase:true ```