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(ci): Automated Versioning & Fixed Issue #2744

Merged
merged 5 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/upload-demo-app-on-firebase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
type: string

pull_request:
types: [ synchronize, opened, reopened, edited, closed, labeled ]
types: [ labeled ]
branches:
- 'development'
- 'master'
Expand All @@ -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:
Expand Down
9 changes: 9 additions & 0 deletions androidApp/src/demo/res/mipmap-anydpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2025 Mifos Initiative

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
If a copy of the MPL was not distributed with this file,
You can obtain one at https://mozilla.org/MPL/2.0/.

See https://github.com/openMF/mobile-mobile/blob/master/LICENSE.md
-->
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2025 Mifos Initiative

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
If a copy of the MPL was not distributed with this file,
You can obtain one at https://mozilla.org/MPL/2.0/.

See https://github.com/openMF/mobile-mobile/blob/master/LICENSE.md
-->
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
Expand Down
16 changes: 7 additions & 9 deletions fastlane/FastFile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ platform :android do
)

# Generate Release Note
releaseNotes = generateFullReleaseNote()
releaseNotes = generateReleaseNote()

buildAndSignApp(
taskName: "assembleProd",
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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'
Expand All @@ -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
Expand Down Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions fastlane/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading