Skip to content

Commit 08dfe61

Browse files
committed
Refactor: Migrate CI to Use Github Actions
This commit migrates the CI workflows from reusable workflows to local workflows within the repository. This change provides greater control and flexibility in managing the CI process. The following changes were made: - Removed the dependency on the `mifos-mobile-github-actions` repository for CI workflows. - Implemented local workflows for tagging weekly releases, PR checks, and building/publishing multi-platform artifacts. - Updated the weekly release workflow to trigger the multi-platform build and publish workflow for beta releases. - Added package name inputs to the PR check workflow for Android, desktop, web, and iOS platforms. - Removed unused workflows for publishing Android and web apps to Firebase and GitHub Pages, respectively.
1 parent ed09977 commit 08dfe61

6 files changed

+73
-90
lines changed

.github/workflows/deploy-android-app-to-firebase.yaml

-35
This file was deleted.

.github/workflows/deploy-android-app-to-pages.yaml

-29
This file was deleted.

.github/workflows/pr-check.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,7 @@ jobs:
8484
uses: openMF/mifos-mobile-github-actions/.github/workflows/pr-check.yaml@main
8585
secrets: inherit
8686
with:
87-
android_package_name: 'mifospay-android'
88-
desktop_package_name: 'mifospay-desktop'
87+
android_package_name: 'mifospay-android' # <-- Change Your Android Package Name
88+
desktop_package_name: 'mifospay-desktop' # <-- Change Your Desktop Package Name
89+
web_package_name: 'mifospay-web' # <-- Change Your Web Package Name
90+
ios_package_name: 'mifospay-ios' # <-- Change Your iOS Package Name

.github/workflows/tag-weekly-release.yml

+37-7
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@
5454
# - Manual workflow dispatch
5555
# - Callable from other workflows
5656

57-
58-
# https://github.com/openMF/mifos-mobile-github-actions/blob/main/.github/workflows/tag-weekly-release.yaml
59-
6057
# ##############################################################################
6158
# DON'T EDIT THIS FILE UNLESS NECESSARY #
6259
# ##############################################################################
@@ -79,7 +76,40 @@ concurrency:
7976
jobs:
8077
tag:
8178
name: Tag Weekly Release
82-
uses: openMF/mifos-mobile-github-actions/.github/workflows/tag-weekly-release.yaml@main
83-
secrets: inherit
84-
with:
85-
target_branch: 'dev'
79+
runs-on: ubuntu-latest
80+
steps:
81+
# Checkout the repository with full history for proper versioning
82+
- uses: actions/checkout@v4
83+
with:
84+
fetch-depth: 0
85+
86+
# Setup Java environment for Gradle operations
87+
- name: Set up JDK 17
88+
uses: actions/[email protected]
89+
with:
90+
distribution: 'temurin'
91+
java-version: '17'
92+
93+
# Create and push a new version tag using Reckon
94+
# This uses the 'final' stage for production-ready releases
95+
- name: Tag Weekly Release
96+
env:
97+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
98+
run: ./gradlew :reckonTagPush -Preckon.stage=final
99+
100+
# Trigger the build and publish workflow for beta release
101+
# This starts the process of building and deploying the app to various platforms
102+
- name: Trigger Workflow
103+
uses: actions/github-script@v7
104+
with:
105+
script: |
106+
github.rest.actions.createWorkflowDispatch({
107+
owner: context.repo.owner,
108+
repo: context.repo.repo,
109+
workflow_id: 'multi-platform-build-and-publish.yml',
110+
ref: 'dev',
111+
inputs: {
112+
"release_type": "beta",
113+
},
114+
})
115+

Gemfile.lock

+10-10
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ GEM
1010
artifactory (3.0.17)
1111
atomos (0.1.3)
1212
aws-eventstream (1.3.0)
13-
aws-partitions (1.1013.0)
13+
aws-partitions (1.1023.0)
1414
aws-sdk-core (3.214.0)
1515
aws-eventstream (~> 1, >= 1.3.0)
1616
aws-partitions (~> 1, >= 1.992.0)
@@ -19,7 +19,7 @@ GEM
1919
aws-sdk-kms (1.96.0)
2020
aws-sdk-core (~> 3, >= 3.210.0)
2121
aws-sigv4 (~> 1.5)
22-
aws-sdk-s3 (1.174.0)
22+
aws-sdk-s3 (1.176.1)
2323
aws-sdk-core (~> 3, >= 3.210.0)
2424
aws-sdk-kms (~> 1)
2525
aws-sigv4 (~> 1.5)
@@ -68,7 +68,7 @@ GEM
6868
faraday_middleware (1.2.1)
6969
faraday (~> 1.0)
7070
fastimage (2.3.1)
71-
fastlane (2.225.0)
71+
fastlane (2.226.0)
7272
CFPropertyList (>= 2.3, < 4.0.0)
7373
addressable (>= 2.8, < 3.0.0)
7474
artifactory (~> 3.0)
@@ -108,7 +108,7 @@ GEM
108108
tty-spinner (>= 0.8.0, < 1.0.0)
109109
word_wrap (~> 1.0.0)
110110
xcodeproj (>= 1.13.0, < 2.0.0)
111-
xcpretty (~> 0.3.0)
111+
xcpretty (~> 0.4.0)
112112
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
113113
fastlane-plugin-firebase_app_distribution (0.9.1)
114114
google-apis-firebaseappdistribution_v1 (~> 0.3.0)
@@ -158,11 +158,11 @@ GEM
158158
os (>= 0.9, < 2.0)
159159
signet (>= 0.16, < 2.a)
160160
highline (2.0.3)
161-
http-cookie (1.0.7)
161+
http-cookie (1.0.8)
162162
domain_name (~> 0.5)
163163
httpclient (2.8.3)
164164
jmespath (1.6.2)
165-
json (2.8.2)
165+
json (2.9.0)
166166
jwt (2.9.3)
167167
base64
168168
mini_magick (4.13.2)
@@ -182,8 +182,8 @@ GEM
182182
trailblazer-option (>= 0.1.1, < 0.2.0)
183183
uber (< 0.2.0)
184184
retriable (3.1.2)
185-
rexml (3.3.9)
186-
rouge (2.0.7)
185+
rexml (3.4.0)
186+
rouge (3.28.0)
187187
ruby2_keywords (0.0.5)
188188
rubyzip (2.3.2)
189189
security (0.1.5)
@@ -214,8 +214,8 @@ GEM
214214
colored2 (~> 3.1)
215215
nanaimo (~> 0.4.0)
216216
rexml (>= 3.3.6, < 4.0)
217-
xcpretty (0.3.0)
218-
rouge (~> 2.0.7)
217+
xcpretty (0.4.0)
218+
rouge (~> 3.28.0)
219219
xcpretty-travis-formatter (1.0.1)
220220
xcpretty (~> 0.2, >= 0.0.7)
221221

fastlane/FastFile

+22-7
Original file line numberDiff line numberDiff line change
@@ -53,29 +53,44 @@ platform :ios do
5353
desc "Build iOS application"
5454
lane :build_ios do
5555
build_ios_app(
56-
project: "mifospay-ios/iosApp.xcodeproj/project.pbxproj",
56+
project: "mifospay-ios/iosApp.xcodeproj",
57+
scheme: "iosApp",
5758
# Set configuration to debug for now
5859
configuration: "Debug",
5960
output_directory: "mifospay-ios/",
60-
output_name: "mifospay-ios-app"
61+
output_name: "mifospay-ios-app.ipa",
62+
skip_codesigning: "true",
63+
skip_archive: "true"
6164
)
6265
end
6366

67+
lane :increment_version do
68+
latest_release = firebase_app_distribution_get_latest_release(
69+
app: "1:728434912738:ios:86a7badfaed88b841a1dbb"
70+
)
71+
increment_build_number(
72+
xcodeproj: "mifospay-ios/iosApp.xcodeproj",
73+
build_number: latest_release[:buildVersion].to_i + 1
74+
)
75+
end
76+
6477
desc "Upload iOS application to Firebase App Distribution"
6578
lane :deploy_on_firebase do
6679
increment_build_number(
67-
xcodeproj: "mifospay-ios/iosApp.xcodeproj/project.pbxproj"
80+
xcodeproj: "mifospay-ios/iosApp.xcodeproj"
6881
)
6982

7083
build_ios_app(
71-
project: "mifospay-ios/iosApp.xcodeproj/project.pbxproj",
72-
# Set configuration to debug for now
84+
project: "mifospay-ios/iosApp.xcodeproj",
85+
scheme: "iosApp",
7386
configuration: "Debug",
87+
skip_codesigning: "true",
88+
skip_archive: "true"
7489
)
7590
release = firebase_app_distribution(
7691
app: "1:728434912738:ios:86a7badfaed88b841a1dbb",
77-
service_credentials_file: "mifospay-android/firebaseAppDistributionServiceCredentialsFile.json",
78-
release_notes_file: "mifospay-android/build/outputs/changelogBeta",
92+
service_credentials_file: "mifospay-ios/firebaseAppDistributionServiceCredentialsFile.json",
93+
release_notes_file: "mifospay-ios/changelogBeta",
7994
groups: "mifos-wallet-testers"
8095
)
8196

0 commit comments

Comments
 (0)