From 53f60d846401c25da745d2fd66705190ef293c74 Mon Sep 17 00:00:00 2001 From: Sk Niyaj Ali Date: Tue, 14 Jan 2025 16:44:00 +0530 Subject: [PATCH 1/5] chore: update Firebase App Distribution workflow Update the workflow to only trigger on pull request labeled events. Also update the fastlane lane name to `deployInternal`. Update `service_creds` and `app_id` in `FastFile`. --- .github/workflows/upload-demo-app-on-firebase.yaml | 2 +- fastlane/FastFile | 4 ++-- fastlane/README.md | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/upload-demo-app-on-firebase.yaml b/.github/workflows/upload-demo-app-on-firebase.yaml index 5b3e02a4d..f0dedff2b 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' diff --git a/fastlane/FastFile b/fastlane/FastFile index 7b3a4dc1b..5390ae632 100644 --- a/fastlane/FastFile +++ b/fastlane/FastFile @@ -251,8 +251,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 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 From a0027858283ff5390eae41836f3dcce9afa20517 Mon Sep 17 00:00:00 2001 From: Sk Niyaj Ali Date: Tue, 14 Jan 2025 16:47:01 +0530 Subject: [PATCH 2/5] ci: Allow workflow to be triggered manually Added a condition to allow the workflow to be triggered manually in addition to the existing label trigger. --- .github/workflows/upload-demo-app-on-firebase.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/upload-demo-app-on-firebase.yaml b/.github/workflows/upload-demo-app-on-firebase.yaml index f0dedff2b..4e0a1ff3d 100644 --- a/.github/workflows/upload-demo-app-on-firebase.yaml +++ b/.github/workflows/upload-demo-app-on-firebase.yaml @@ -22,7 +22,7 @@ concurrency: jobs: 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: From 52324226b428d620fb2b884882f9712eeea561ae Mon Sep 17 00:00:00 2001 From: Sk Niyaj Ali Date: Tue, 14 Jan 2025 16:57:16 +0530 Subject: [PATCH 3/5] chore: Add Copyright and License to Adaptive Icons Added copyright and license information to the adaptive icon XML files, `ic_launcher_round.xml` and `ic_launcher.xml`, in the `demo` resource directory. Also updated the upload workflow name to "Upload Demo App on Firebase". --- .github/workflows/upload-demo-app-on-firebase.yaml | 1 + .../src/demo/res/mipmap-anydpi-v26/ic_launcher.xml | 9 +++++++++ .../src/demo/res/mipmap-anydpi-v26/ic_launcher_round.xml | 9 +++++++++ 3 files changed, 19 insertions(+) diff --git a/.github/workflows/upload-demo-app-on-firebase.yaml b/.github/workflows/upload-demo-app-on-firebase.yaml index 4e0a1ff3d..5abfc081e 100644 --- a/.github/workflows/upload-demo-app-on-firebase.yaml +++ b/.github/workflows/upload-demo-app-on-firebase.yaml @@ -21,6 +21,7 @@ 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' || github.event_name == 'workflow_dispatch' steps: 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 @@ + From 8d5514b0ea302fd5201a8757c7ad93056e2c609f Mon Sep 17 00:00:00 2001 From: Sk Niyaj Ali Date: Tue, 14 Jan 2025 18:52:15 +0530 Subject: [PATCH 4/5] chore: Update versioning and release notes generation - Updated version setting to use a fallback value of "1.0.0" if version.txt is not found. - Switched from `generateFullReleaseNote` to `generateReleaseNote` for release note generation in both playstore and internal lanes. - Modified `generateReleaseNote` to consider the last 3 commits for release notes instead of just 1. - Changed the return value of `updateVersions` to only return the version string. --- fastlane/FastFile | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/fastlane/FastFile b/fastlane/FastFile index 5390ae632..590331349 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' @@ -286,16 +287,13 @@ 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" lane :generateReleaseNote do |options| releaseNotes = changelog_from_git_commits( - commits_count: 1, + commits_count: 3, ) releaseNotes end From 69b91574879e53775654a0fbb20fcdacc4a6efef Mon Sep 17 00:00:00 2001 From: Sk Niyaj Ali Date: Tue, 14 Jan 2025 19:32:39 +0530 Subject: [PATCH 5/5] chore: Update `generateReleaseNote` lane --- fastlane/FastFile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane/FastFile b/fastlane/FastFile index 590331349..d1ca45fa8 100644 --- a/fastlane/FastFile +++ b/fastlane/FastFile @@ -293,7 +293,7 @@ platform :android do desc "Generate release notes" lane :generateReleaseNote do |options| releaseNotes = changelog_from_git_commits( - commits_count: 3, + commits_count: 1, ) releaseNotes end