Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(fastlane): Refactor Fastlane configuration and workflows #1846

Merged
merged 10 commits into from
Feb 4, 2025
4 changes: 2 additions & 2 deletions .github/workflows/multi-platform-build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ on:

target_branch:
type: string
default: 'dev'
default: 'development'
description: 'Target branch for release'

build_ios:
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
ios_package_name: 'mifospay-ios' # <-- Change this to your ios package name
desktop_package_name: 'mifospay-desktop' # <-- Change this to your desktop package name
web_package_name: 'mifospay-web' # <-- Change this to your web package name
tester_groups: 'mobile-wallet-testing' # <-- Change this to your Firebase tester group
tester_groups: 'mifos-mobile-testers' # <-- Change this to your Firebase tester group
build_ios: ${{ inputs.build_ios }}
publish_ios: ${{ inputs.publish_ios }}
secrets:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tag-weekly-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'multi-platform-build-and-publish.yml',
ref: 'dev',
ref: 'development',
inputs: {
"release_type": "beta",
},
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/upload-demo-app-on-firebase.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Upload Demo App on Firebase

on:
workflow_dispatch:
inputs:
tester_groups:
description: 'Comma-separated list of tester groups'
required: true
default: 'mifos-mobile-testers'
type: string

pull_request:
types: [ labeled ]
branches:
- 'development'
- 'master'

concurrency:
group: firebase-${{ github.ref }}
cancel-in-progress: true

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:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: ☁️ Deploy Android App on Firebase
uses: openMF/[email protected]
with:
release_type: 'demo'
android_package_name: 'mifospay-android'
keystore_file: ${{ secrets.ORIGINAL_KEYSTORE_FILE }}
keystore_password: ${{ secrets.ORIGINAL_KEYSTORE_FILE_PASSWORD }}
keystore_alias: ${{ secrets.ORIGINAL_KEYSTORE_ALIAS }}
keystore_alias_password: ${{ secrets.ORIGINAL_KEYSTORE_ALIAS_PASSWORD }}
google_services: ${{ secrets.GOOGLESERVICES }}
firebase_creds: ${{ secrets.FIREBASECREDS }}
tester_groups: ${{ inputs.tester_groups }}
8 changes: 6 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
source "https://rubygems.org"

ruby File.read(".ruby-version").strip
begin
ruby File.read(".ruby-version").strip
rescue Errno::ENOENT
ruby "3.3.5" # Default version if .ruby-version doesn't exist
end

gem "fastlane"

plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
plugins_path = File.join(File.dirname(__FILE__), "fastlane", "Pluginfile")
eval_gemfile(plugins_path) if File.exist?(plugins_path)
24 changes: 12 additions & 12 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ GEM
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.3.0)
aws-partitions (1.1023.0)
aws-sdk-core (3.214.0)
aws-partitions (1.1035.0)
aws-sdk-core (3.215.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.992.0)
aws-sigv4 (~> 1.9)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.96.0)
aws-sdk-core (~> 3, >= 3.210.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.176.1)
aws-sdk-s3 (1.177.0)
aws-sdk-core (~> 3, >= 3.210.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
aws-sigv4 (1.10.1)
aws-sigv4 (1.11.0)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
base64 (0.2.0)
Expand Down Expand Up @@ -58,16 +58,16 @@ GEM
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-multipart (1.0.4)
multipart-post (~> 2)
faraday-multipart (1.1.0)
multipart-post (~> 2.0)
faraday-net_http (1.0.2)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
faraday_middleware (1.2.1)
faraday (~> 1.0)
fastimage (2.3.1)
fastimage (2.4.0)
fastlane (2.226.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
Expand Down Expand Up @@ -110,7 +110,7 @@ GEM
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.4.0)
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
fastlane-plugin-firebase_app_distribution (0.9.1)
fastlane-plugin-firebase_app_distribution (0.10.0)
google-apis-firebaseappdistribution_v1 (~> 0.3.0)
google-apis-firebaseappdistribution_v1alpha (~> 0.2.0)
fastlane-plugin-increment_build_number (0.0.4)
Expand Down Expand Up @@ -162,8 +162,8 @@ GEM
domain_name (~> 0.5)
httpclient (2.8.3)
jmespath (1.6.2)
json (2.9.0)
jwt (2.9.3)
json (2.9.1)
jwt (2.10.1)
base64
mini_magick (4.13.2)
mini_mime (1.1.5)
Expand All @@ -174,7 +174,7 @@ GEM
nkf (0.2.0)
optparse (0.6.0)
os (1.1.4)
plist (3.7.1)
plist (3.7.2)
public_suffix (6.0.1)
rake (13.2.1)
representable (3.2.0)
Expand All @@ -185,7 +185,7 @@ GEM
rexml (3.4.0)
rouge (3.28.0)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
rubyzip (2.4.1)
security (0.1.5)
signet (0.19.0)
addressable (~> 2.8)
Expand Down
23 changes: 23 additions & 0 deletions fastlane-config/android_config.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module FastlaneConfig
module AndroidConfig
STORE_CONFIG = {
default_store_file: "release_keystore.keystore",
default_store_password: "Mifospay",
default_key_alias: "key0",
default_key_password: "Mifos@123"
}

FIREBASE_CONFIG = {
firebase_prod_app_id: "1:64530857057:android:f8d67b786db1b844",
firebase_demo_app_id: "1:728434912738:android:48ccd9153349f31e1a1dbb",
firebase_service_creds_file: "secrets/firebaseAppDistributionServiceCredentialsFile.json",
firebase_groups: "mifos-mobile-testers"
}

BUILD_PATHS = {
prod_apk_path: "mifospay-android/build/outputs/apk/prod/release/mifospay-android-prod-release.apk",
demo_apk_path: "mifospay-android/build/outputs/apk/demo/release/mifospay-android-demo-release.apk",
prod_aab_path: "mifospay-android/build/outputs/bundle/prodRelease/mifospay-android-prod-release.aab"
}
end
end
15 changes: 15 additions & 0 deletions fastlane-config/ios_config.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module FastlaneConfig
module IosConfig
FIREBASE_CONFIG = {
firebase_app_id: "1:728434912738:ios:86a7badfaed88b841a1dbb",
firebase_service_creds_file: "secrets/firebaseAppDistributionServiceCredentialsFile.json",
firebase_groups: "mifos-mobile-testers"
}

BUILD_CONFIG = {
project_path: "mifospay-ios/iosApp.xcodeproj",
scheme: "iosApp",
output_directory: "mifospay-ios/build"
}
end
end
Loading
Loading