Skip to content

Commit 4844e26

Browse files
authored
chore(ci): Automated Versioning & Fixed Issue (#2744)
1 parent 31b92de commit 4844e26

File tree

5 files changed

+30
-13
lines changed

5 files changed

+30
-13
lines changed

.github/workflows/upload-demo-app-on-firebase.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
type: string
1111

1212
pull_request:
13-
types: [ synchronize, opened, reopened, edited, closed, labeled ]
13+
types: [ labeled ]
1414
branches:
1515
- 'development'
1616
- 'master'
@@ -21,8 +21,9 @@ concurrency:
2121

2222
jobs:
2323
upload_demo_app_on_firebase:
24+
name: Upload Demo App on Firebase
2425
runs-on: macos-latest
25-
if: github.event.label.name == 'firebase-test-on'
26+
if: github.event.label.name == 'firebase-test-on' || github.event_name == 'workflow_dispatch'
2627
steps:
2728
- uses: actions/checkout@v4
2829
with:

androidApp/src/demo/res/mipmap-anydpi-v26/ic_launcher.xml

+9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Copyright 2025 Mifos Initiative
4+
5+
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
6+
If a copy of the MPL was not distributed with this file,
7+
You can obtain one at https://mozilla.org/MPL/2.0/.
8+
9+
See https://github.com/openMF/mobile-mobile/blob/master/LICENSE.md
10+
-->
211
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
312
<background android:drawable="@color/ic_launcher_background"/>
413
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>

androidApp/src/demo/res/mipmap-anydpi-v26/ic_launcher_round.xml

+9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Copyright 2025 Mifos Initiative
4+
5+
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
6+
If a copy of the MPL was not distributed with this file,
7+
You can obtain one at https://mozilla.org/MPL/2.0/.
8+
9+
See https://github.com/openMF/mobile-mobile/blob/master/LICENSE.md
10+
-->
211
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
312
<background android:drawable="@color/ic_launcher_background"/>
413
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>

fastlane/FastFile

+7-9
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ platform :android do
6868
)
6969

7070
# Generate Release Note
71-
releaseNotes = generateFullReleaseNote()
71+
releaseNotes = generateReleaseNote()
7272

7373
buildAndSignApp(
7474
taskName: "assembleProd",
@@ -144,7 +144,7 @@ platform :android do
144144
)
145145

146146
# Generate Release Note
147-
releaseNotes = generateFullReleaseNote()
147+
releaseNotes = generateReleaseNote()
148148

149149
# Write the generated release notes to default.txt
150150
buildConfigPath = "metadata/android/en-US/changelogs/default.txt"
@@ -234,7 +234,8 @@ platform :android do
234234
gradle(tasks: ["versionFile"])
235235

236236
# Set version from file with fallback
237-
ENV['VERSION'] = File.read("../version.txt").strip rescue "1.0.0"
237+
version = File.read("../version.txt").strip rescue "1.0.0"
238+
ENV['VERSION'] = version
238239

239240
case platform
240241
when 'playstore'
@@ -251,8 +252,8 @@ platform :android do
251252
ENV['VERSION_CODE'] = (latest_code + 1).to_s
252253

253254
when 'firebase'
254-
service_creds = options[:serviceCredsFile] || "secrets/firebaseAppDistributionServiceCredentialsFile.json"
255-
app_id = options[:appId] || "1:728434912738:android:d853a78f14af0c381a1dbb"
255+
service_creds = options[:serviceCredsFile] ||= "secrets/firebaseAppDistributionServiceCredentialsFile.json"
256+
app_id = options[:appId] ||= "1:728434912738:android:d853a78f14af0c381a1dbb"
256257

257258
begin
258259
# Get latest release from Firebase App Distribution
@@ -286,10 +287,7 @@ platform :android do
286287
UI.success("Set VERSION=#{ENV['VERSION']} VERSION_CODE=#{ENV['VERSION_CODE']}")
287288

288289
# Return the values for potential further use
289-
{
290-
version: ENV['VERSION'],
291-
version_code: ENV['VERSION_CODE']
292-
}
290+
version
293291
end
294292

295293
desc "Generate release notes"

fastlane/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ Publish Release Artifacts to Firebase App Distribution
5555

5656
Publish Demo Artifacts to Firebase App Distribution
5757

58-
### android deployOnInternal
58+
### android deployInternal
5959

6060
```sh
61-
[bundle exec] fastlane android deployOnInternal
61+
[bundle exec] fastlane android deployInternal
6262
```
6363

6464
Deploy internal tracks to Google Play

0 commit comments

Comments
 (0)