From 4844e265732bb367f4237533db100017c1b5cd2b Mon Sep 17 00:00:00 2001 From: Sk Niyaj Ali Date: Tue, 14 Jan 2025 20:43:17 +0530 Subject: [PATCH] chore(ci): Automated Versioning & Fixed Issue (#2744) --- .../workflows/upload-demo-app-on-firebase.yaml | 5 +++-- .../demo/res/mipmap-anydpi-v26/ic_launcher.xml | 9 +++++++++ .../res/mipmap-anydpi-v26/ic_launcher_round.xml | 9 +++++++++ fastlane/FastFile | 16 +++++++--------- fastlane/README.md | 4 ++-- 5 files changed, 30 insertions(+), 13 deletions(-) diff --git a/.github/workflows/upload-demo-app-on-firebase.yaml b/.github/workflows/upload-demo-app-on-firebase.yaml index 5b3e02a4d..5abfc081e 100644 --- a/.github/workflows/upload-demo-app-on-firebase.yaml +++ b/.github/workflows/upload-demo-app-on-firebase.yaml @@ -10,7 +10,7 @@ on: type: string pull_request: - types: [ synchronize, opened, reopened, edited, closed, labeled ] + types: [ labeled ] branches: - 'development' - 'master' @@ -21,8 +21,9 @@ concurrency: jobs: upload_demo_app_on_firebase: + name: Upload Demo App on Firebase runs-on: macos-latest - if: github.event.label.name == 'firebase-test-on' + if: github.event.label.name == 'firebase-test-on' || github.event_name == 'workflow_dispatch' steps: - uses: actions/checkout@v4 with: diff --git a/androidApp/src/demo/res/mipmap-anydpi-v26/ic_launcher.xml b/androidApp/src/demo/res/mipmap-anydpi-v26/ic_launcher.xml index 036d09bc5..1c76cd711 100644 --- a/androidApp/src/demo/res/mipmap-anydpi-v26/ic_launcher.xml +++ b/androidApp/src/demo/res/mipmap-anydpi-v26/ic_launcher.xml @@ -1,4 +1,13 @@ + diff --git a/androidApp/src/demo/res/mipmap-anydpi-v26/ic_launcher_round.xml b/androidApp/src/demo/res/mipmap-anydpi-v26/ic_launcher_round.xml index 036d09bc5..1c76cd711 100644 --- a/androidApp/src/demo/res/mipmap-anydpi-v26/ic_launcher_round.xml +++ b/androidApp/src/demo/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -1,4 +1,13 @@ + diff --git a/fastlane/FastFile b/fastlane/FastFile index 7b3a4dc1b..d1ca45fa8 100644 --- a/fastlane/FastFile +++ b/fastlane/FastFile @@ -68,7 +68,7 @@ platform :android do ) # Generate Release Note - releaseNotes = generateFullReleaseNote() + releaseNotes = generateReleaseNote() buildAndSignApp( taskName: "assembleProd", @@ -144,7 +144,7 @@ platform :android do ) # Generate Release Note - releaseNotes = generateFullReleaseNote() + releaseNotes = generateReleaseNote() # Write the generated release notes to default.txt buildConfigPath = "metadata/android/en-US/changelogs/default.txt" @@ -234,7 +234,8 @@ platform :android do gradle(tasks: ["versionFile"]) # Set version from file with fallback - ENV['VERSION'] = File.read("../version.txt").strip rescue "1.0.0" + version = File.read("../version.txt").strip rescue "1.0.0" + ENV['VERSION'] = version case platform when 'playstore' @@ -251,8 +252,8 @@ platform :android do ENV['VERSION_CODE'] = (latest_code + 1).to_s when 'firebase' - service_creds = options[:serviceCredsFile] || "secrets/firebaseAppDistributionServiceCredentialsFile.json" - app_id = options[:appId] || "1:728434912738:android:d853a78f14af0c381a1dbb" + service_creds = options[:serviceCredsFile] ||= "secrets/firebaseAppDistributionServiceCredentialsFile.json" + app_id = options[:appId] ||= "1:728434912738:android:d853a78f14af0c381a1dbb" begin # Get latest release from Firebase App Distribution @@ -286,10 +287,7 @@ platform :android do UI.success("Set VERSION=#{ENV['VERSION']} VERSION_CODE=#{ENV['VERSION_CODE']}") # Return the values for potential further use - { - version: ENV['VERSION'], - version_code: ENV['VERSION_CODE'] - } + version end desc "Generate release notes" diff --git a/fastlane/README.md b/fastlane/README.md index ad2f4e1bb..fba227b9c 100644 --- a/fastlane/README.md +++ b/fastlane/README.md @@ -55,10 +55,10 @@ Publish Release Artifacts to Firebase App Distribution Publish Demo Artifacts to Firebase App Distribution -### android deployOnInternal +### android deployInternal ```sh -[bundle exec] fastlane android deployOnInternal +[bundle exec] fastlane android deployInternal ``` Deploy internal tracks to Google Play