Skip to content

Commit c91f980

Browse files
authored
feat: Bug Fixes & Setup Release Process (#2293)
1 parent 2c3d991 commit c91f980

File tree

180 files changed

+4835
-2785
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

180 files changed

+4835
-2785
lines changed

.github/workflows/android-release.yml

+96
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# GitHub Actions Workflow for Kotlin Android Application Deployment
2+
#
3+
# OVERVIEW:
4+
# This workflow supports building and publishing applications across multiple platforms:
5+
# - Android (APK/AAB)
6+
#
7+
# PREREQUISITES:
8+
# Ensure your project is configured with:
9+
# - Gradle build system
10+
# - Kotlin Multiplatform Project with Android, iOS, Desktop, and Web modules
11+
# - Fastlane for deployment automation
12+
# - Separate modules/package names for each platform
13+
#
14+
# REQUIRED SECRETS:
15+
# Configure the following secrets in GitHub repository settings:
16+
# - ORIGINAL_KEYSTORE_FILE: Base64 encoded Android release keystore
17+
# - ORIGINAL_KEYSTORE_FILE_PASSWORD: Keystore password
18+
# - ORIGINAL_KEYSTORE_ALIAS: Keystore alias
19+
# - ORIGINAL_KEYSTORE_ALIAS_PASSWORD: Keystore alias password
20+
21+
# - UPLOAD_KEYSTORE_FILE: Base64 encoded Android release keystore
22+
# - UPLOAD_KEYSTORE_FILE_PASSWORD: Keystore password
23+
# - UPLOAD_KEYSTORE_ALIAS: Keystore alias
24+
# - UPLOAD_KEYSTORE_ALIAS_PASSWORD: Keystore alias password
25+
26+
# - GOOGLESERVICES: Google Services configuration JSON
27+
# - PLAYSTORECREDS: Play Store service account credentials
28+
# - FIREBASECREDS: Firebase distribution credentials
29+
30+
# WORKFLOW INPUTS:
31+
# - release_type: 'internal' (default) or 'beta'
32+
# - target_branch: Branch to use for release (default: 'dev')
33+
# - android_package_name: Name of Android module
34+
35+
# USAGE:
36+
# 1. Ensure all required secrets are configured
37+
# 2. Customize package names in workflow inputs
38+
# 3. Toggle platform-specific publishing flags
39+
# 4. Trigger workflow manually or via GitHub Actions UI
40+
41+
# https://github.com/openMF/mifos-mobile-github-actions/blob/main/.github/workflows/android-build-and-publish.yaml
42+
43+
# ##############################################################################
44+
# DON'T EDIT THIS FILE UNLESS NECESSARY #
45+
# ##############################################################################
46+
name: Android Build and Publish
47+
48+
on:
49+
workflow_dispatch:
50+
inputs:
51+
release_type:
52+
type: choice
53+
options:
54+
- internal
55+
- beta
56+
default: internal
57+
description: Release Type
58+
59+
target_branch:
60+
type: string
61+
default: 'development'
62+
description: 'Target branch for release'
63+
64+
permissions:
65+
contents: write
66+
id-token: write
67+
pages: write
68+
69+
concurrency:
70+
group: "reusable"
71+
cancel-in-progress: false
72+
73+
jobs:
74+
android_build_and_publish:
75+
name: Android Build and Publish
76+
uses: openMF/mifos-mobile-github-actions/.github/workflows/android-build-and-publish.yaml@main
77+
with:
78+
release_type: ${{ inputs.release_type }}
79+
target_branch: ${{ inputs.target_branch }}
80+
android_package_name: 'mifosng-android' # <-- Change this to your android package name
81+
tester_groups: 'mifos-mobile-testers' # <-- Change this to your Firebase tester group
82+
secrets:
83+
original_keystore_file: ${{ secrets.ORIGINAL_KEYSTORE_FILE }}
84+
original_keystore_file_password: ${{ secrets.ORIGINAL_KEYSTORE_FILE_PASSWORD }}
85+
original_keystore_alias: ${{ secrets.ORIGINAL_KEYSTORE_ALIAS }}
86+
original_keystore_alias_password: ${{ secrets.ORIGINAL_KEYSTORE_ALIAS_PASSWORD }}
87+
88+
upload_keystore_file: ${{ secrets.UPLOAD_KEYSTORE_FILE }}
89+
upload_keystore_file_password: ${{ secrets.UPLOAD_KEYSTORE_FILE_PASSWORD }}
90+
upload_keystore_alias: ${{ secrets.UPLOAD_KEYSTORE_ALIAS }}
91+
upload_keystore_alias_password: ${{ secrets.UPLOAD_KEYSTORE_ALIAS_PASSWORD }}
92+
93+
google_services: ${{ secrets.GOOGLESERVICES }}
94+
firebase_creds: ${{ secrets.FIREBASECREDS }}
95+
playstore_creds: ${{ secrets.PLAYSTORECREDS }}
96+
token: ${{ secrets.GITHUB_TOKEN }}
+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Automated Monthly Release Versioning Workflow
2+
# ============================================
3+
4+
# Purpose:
5+
# - Automatically create consistent monthly version tags
6+
# - Implement a calendar-based versioning strategy
7+
# - Facilitate easy tracking of monthly releases
8+
9+
# Versioning Strategy:
10+
# - Tag format: YYYY.MM.0 (e.g., 2024.01.0 for January 2024)
11+
# - First digit: Full year
12+
# - Second digit: Month (01-12)
13+
# - Third digit: Patch version (starts at 0, allows for potential updates)
14+
15+
# Key Features:
16+
# - Runs automatically on the first day of each month at 3:30 AM UTC
17+
# - Can be manually triggered via workflow_dispatch
18+
# - Uses GitHub Actions to generate tags programmatically
19+
# - Provides a predictable and systematic versioning approach
20+
21+
# Prerequisites:
22+
# - Repository configured with GitHub Actions
23+
# - Permissions to create tags
24+
# - Access to actions/checkout and tag creation actions
25+
26+
# Workflow Triggers:
27+
# - Scheduled monthly run
28+
# - Manual workflow dispatch
29+
# - Callable from other workflows
30+
31+
# Actions Used:
32+
# 1. actions/checkout@v4 - Checks out repository code
33+
# 2. josStorer/get-current-time - Retrieves current timestamp
34+
# 3. rickstaa/action-create-tag - Creates Git tags
35+
36+
# Example Generated Tags:
37+
# - 2024.01.0 (January 2024 initial release)
38+
# - 2024.02.0 (February 2024 initial release)
39+
# - 2024.02.1 (Potential patch for February 2024)
40+
41+
# https://github.com/openMF/mifos-mobile-github-actions/blob/main/.github/workflows/monthly-version-tag.yaml
42+
43+
# ##############################################################################
44+
# DON'T EDIT THIS FILE UNLESS NECESSARY #
45+
# ##############################################################################
46+
47+
name: Tag Monthly Release
48+
49+
on:
50+
# Allow manual triggering of the workflow
51+
workflow_dispatch:
52+
# Schedule the workflow to run monthly
53+
schedule:
54+
# Runs at 03:30 UTC on the first day of every month
55+
# Cron syntax: minute hour day-of-month month day-of-week
56+
- cron: '30 3 1 * *'
57+
58+
concurrency:
59+
group: "monthly-release"
60+
cancel-in-progress: false
61+
62+
jobs:
63+
monthly_release:
64+
name: Tag Monthly Release
65+
uses: openMF/mifos-mobile-github-actions/.github/workflows/monthly-version-tag.yaml@main
66+
secrets: inherit
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# GitHub Actions Workflow for Play Store Release Promotion
2+
#
3+
# PURPOSE:
4+
# This workflow automates the process of promoting a beta release
5+
# to the production track on Google Play Store.
6+
#
7+
# PREREQUISITES:
8+
# 1. Fastlane setup with Android deployment configurations
9+
# 2. Configured Fastlane lanes:
10+
# - `promote_to_production`: Handles beta to production promotion
11+
#
12+
# REQUIRED CONFIGURATION:
13+
# - Secrets:
14+
# PLAYSTORECREDS: Google Play Store service account JSON credentials
15+
#
16+
# INPUTS:
17+
# - android_package_name: Name of the Android project module
18+
# (REQUIRED, must match your project's module structure)
19+
#
20+
# WORKFLOW TRIGGERS:
21+
# - Can be called manually or triggered by other workflows
22+
# - Typically used after beta testing and validation
23+
#
24+
# DEPLOYMENT PROCESS:
25+
# 1. Checks out repository code
26+
# 2. Sets up Ruby and Fastlane environment
27+
# 3. Inflates Play Store credentials
28+
# 4. Runs Fastlane lane to promote beta to production
29+
#
30+
# IMPORTANT NOTES:
31+
# - Requires proper Fastlane configuration in your project
32+
# - Ensures consistent and automated Play Store deployments
33+
# - Configurable retry mechanism for upload stability
34+
#
35+
# RECOMMENDED FASTLANE LANE IMPLEMENTATION:
36+
# ```ruby
37+
# lane :promote_to_production do
38+
# upload_to_play_store(
39+
# track: 'beta',
40+
# track_promote_to: 'production',
41+
# json_key: './playStorePublishServiceCredentialsFile.json'
42+
# )
43+
# end
44+
# ```
45+
46+
# https://github.com/openMF/mifos-mobile-github-actions/blob/main/.github/workflows/promote-to-production.yaml
47+
48+
# ##############################################################################
49+
# DON'T EDIT THIS FILE UNLESS NECESSARY #
50+
# ##############################################################################
51+
52+
name: Promote Release to Play Store
53+
54+
# Workflow triggers:
55+
# 1. Manual trigger with option to publish to Play Store
56+
# 2. Automatic trigger when a GitHub release is published
57+
on:
58+
workflow_dispatch:
59+
release:
60+
types: [ released ]
61+
62+
concurrency:
63+
group: "production-deploy"
64+
cancel-in-progress: false
65+
66+
permissions:
67+
contents: write
68+
69+
jobs:
70+
# Job to promote app from beta to production in Play Store
71+
play_promote_production:
72+
name: Promote Beta to Production Play Store
73+
uses: openMF/mifos-mobile-github-actions/.github/workflows/promote-to-production.yaml@main
74+
secrets:
75+
playstore_creds: ${{ secrets.PLAYSTORECREDS }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Upload Demo App on Firebase
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
tester_groups:
7+
description: 'Comma-separated list of tester groups'
8+
required: true
9+
default: 'mifos-mobile-testers'
10+
type: string
11+
12+
pull_request:
13+
types: [ labeled ]
14+
branches:
15+
- 'development'
16+
- 'master'
17+
18+
concurrency:
19+
group: firebase-${{ github.ref }}
20+
cancel-in-progress: true
21+
22+
jobs:
23+
upload_demo_app_on_firebase:
24+
name: Upload Demo App on Firebase
25+
runs-on: macos-latest
26+
if: github.event.label.name == 'firebase-test-on' || github.event_name == 'workflow_dispatch'
27+
steps:
28+
- uses: actions/checkout@v4
29+
with:
30+
fetch-depth: 0
31+
32+
- name: ☁️ Deploy Android App on Firebase
33+
uses: openMF/[email protected]
34+
with:
35+
release_type: 'demo'
36+
android_package_name: 'mifosng-android'
37+
keystore_file: ${{ secrets.ORIGINAL_KEYSTORE_FILE }}
38+
keystore_password: ${{ secrets.ORIGINAL_KEYSTORE_FILE_PASSWORD }}
39+
keystore_alias: ${{ secrets.ORIGINAL_KEYSTORE_ALIAS }}
40+
keystore_alias_password: ${{ secrets.ORIGINAL_KEYSTORE_ALIAS_PASSWORD }}
41+
google_services: ${{ secrets.GOOGLESERVICES }}
42+
firebase_creds: ${{ secrets.FIREBASECREDS }}
43+
tester_groups: ${{ inputs.tester_groups }}

.github/workflows/weekly-release.yaml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Tag Weekly Release
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '0 4 * * 0'
7+
jobs:
8+
tag:
9+
name: Tag Weekly Release
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 0
15+
16+
- name: Set up JDK 17
17+
uses: actions/[email protected]
18+
with:
19+
distribution: 'temurin'
20+
java-version: '17'
21+
22+
- name: Tag Weekly Release
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.TAG_PUSH_TOKEN }}
25+
run: ./gradlew :reckonTagPush -Preckon.stage=final
26+
27+
- name: Trigger Workflow
28+
uses: actions/github-script@v7
29+
with:
30+
script: |
31+
github.rest.actions.createWorkflowDispatch({
32+
owner: context.repo.owner,
33+
repo: context.repo.repo,
34+
workflow_id: 'android-release.yml',
35+
ref: 'dev',
36+
inputs: {
37+
"release_type": "beta",
38+
},
39+
})

0 commit comments

Comments
 (0)