Skip to content

Commit

Permalink
ci: Configured GitHub Workflow For Play Store & FAD Publishing (#2738)
Browse files Browse the repository at this point in the history
  • Loading branch information
niyajali authored Jan 11, 2025
1 parent d3d673f commit 466b245
Show file tree
Hide file tree
Showing 47 changed files with 833 additions and 593 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
### We're moving towards to use [Jira](https://mifosforge.jira.com/jira/software/c/projects/MM/issues/) for issue tracking, and Join our [slack](https://join.slack.com/t/mifos/shared_invite/zt-2wvi9t82t-DuSBdqdQVOY9fsqsLjkKPA) channel `mifos-mobile` to discuss all things about Mifos Mobile development. and do not cross post your messages in multiple channels. ask your question in the appropriate channel.
#### We are transitioning to [Jira](https://mifosforge.jira.com/jira/software/c/projects/MM/issues/) for issue tracking. Additionally, we encourage you to join our Slack channel #mifos-mobile to discuss all aspects of Mifos Mobile development. Please ensure that your messages are not cross-posted in multiple channels. Kindly direct your questions to the most appropriate channel for efficient communication.
56 changes: 0 additions & 56 deletions .github/actions/create-release-notes/action.yml

This file was deleted.

54 changes: 0 additions & 54 deletions .github/actions/create-release-number/action.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/actions/inflate-secrets/action.yml

This file was deleted.

55 changes: 0 additions & 55 deletions .github/mock-google-services.json

This file was deleted.

96 changes: 96 additions & 0 deletions .github/workflows/android-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# GitHub Actions Workflow for Kotlin Android Application Deployment
#
# OVERVIEW:
# This workflow supports building and publishing applications across multiple platforms:
# - Android (APK/AAB)
#
# PREREQUISITES:
# Ensure your project is configured with:
# - Gradle build system
# - Kotlin Multiplatform Project with Android, iOS, Desktop, and Web modules
# - Fastlane for deployment automation
# - Separate modules/package names for each platform
#
# REQUIRED SECRETS:
# Configure the following secrets in GitHub repository settings:
# - ORIGINAL_KEYSTORE_FILE: Base64 encoded Android release keystore
# - ORIGINAL_KEYSTORE_FILE_PASSWORD: Keystore password
# - ORIGINAL_KEYSTORE_ALIAS: Keystore alias
# - ORIGINAL_KEYSTORE_ALIAS_PASSWORD: Keystore alias password

# - UPLOAD_KEYSTORE_FILE: Base64 encoded Android release keystore
# - UPLOAD_KEYSTORE_FILE_PASSWORD: Keystore password
# - UPLOAD_KEYSTORE_ALIAS: Keystore alias
# - UPLOAD_KEYSTORE_ALIAS_PASSWORD: Keystore alias password

# - GOOGLESERVICES: Google Services configuration JSON
# - PLAYSTORECREDS: Play Store service account credentials
# - FIREBASECREDS: Firebase distribution credentials

# WORKFLOW INPUTS:
# - release_type: 'internal' (default) or 'beta'
# - target_branch: Branch to use for release (default: 'dev')
# - android_package_name: Name of Android module

# USAGE:
# 1. Ensure all required secrets are configured
# 2. Customize package names in workflow inputs
# 3. Toggle platform-specific publishing flags
# 4. Trigger workflow manually or via GitHub Actions UI

# https://github.com/openMF/mifos-mobile-github-actions/blob/main/.github/workflows/android-build-and-publish.yaml

# ##############################################################################
# DON'T EDIT THIS FILE UNLESS NECESSARY #
# ##############################################################################
name: Android Build and Publish

on:
workflow_dispatch:
inputs:
release_type:
type: choice
options:
- internal
- beta
default: internal
description: Release Type

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

permissions:
contents: write
id-token: write
pages: write

concurrency:
group: "reusable"
cancel-in-progress: false

jobs:
android_build_and_publish:
name: Android Build and Publish
uses: openMF/mifos-mobile-github-actions/.github/workflows/android-build-and-publish.yaml@main
with:
release_type: ${{ inputs.release_type }}
target_branch: ${{ inputs.target_branch }}
android_package_name: 'androidApp' # <-- Change this to your android package name
tester_groups: 'mifos-mobile-testers' # <-- Change this to your Firebase tester group
secrets:
original_keystore_file: ${{ secrets.ORIGINAL_KEYSTORE_FILE }}
original_keystore_file_password: ${{ secrets.ORIGINAL_KEYSTORE_FILE_PASSWORD }}
original_keystore_alias: ${{ secrets.ORIGINAL_KEYSTORE_ALIAS }}
original_keystore_alias_password: ${{ secrets.ORIGINAL_KEYSTORE_ALIAS_PASSWORD }}

upload_keystore_file: ${{ secrets.UPLOAD_KEYSTORE_FILE }}
upload_keystore_file_password: ${{ secrets.UPLOAD_KEYSTORE_FILE_PASSWORD }}
upload_keystore_alias: ${{ secrets.UPLOAD_KEYSTORE_ALIAS }}
upload_keystore_alias_password: ${{ secrets.UPLOAD_KEYSTORE_ALIAS_PASSWORD }}

google_services: ${{ secrets.GOOGLESERVICES }}
firebase_creds: ${{ secrets.FIREBASECREDS }}
playstore_creds: ${{ secrets.PLAYSTORECREDS }}
token: ${{ secrets.GITHUB_TOKEN }}
61 changes: 2 additions & 59 deletions .github/workflows/master_dev_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ jobs:
**/build/reports/detekt/detekt.md
# Dependency Guard is a tool that checks for known vulnerabilities in your dependencies
dependency_guard:
needs: setup
runs-on: ubuntu-latest
Expand Down Expand Up @@ -109,64 +108,8 @@ jobs:
disable_globbing: true
commit_message: "🤖 Updates baselines for Dependency Guard"

tests_and_lint:
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17

- name: Run tests
run: |
./gradlew testDebug :lint:test :androidApp:lintRelease :lint:lint
- name: Upload reports
if: always()
uses: actions/upload-artifact@v4
with:
name: test-and-lint-reports
path: |
**/build/reports/lint-results-*.html
**/build/test-results/test*UnitTest/**.xml
# Add `createDebugUnitTestCoverageReport` if we ever add JVM tests for prod
- name: Generate coverage reports for Debug variants (only API 30)
run: ./gradlew createDebugCombinedCoverageReport

- name: Upload test reports
if: always()
uses: actions/upload-artifact@v4
with:
name: test-reports-${{ matrix.api-level }}
path: '**/build/reports/androidTests'

- name: Display local test coverage (only API 30)
id: jacoco
uses: madrapps/[email protected]
with:
title: Combined test coverage report
min-coverage-overall: 40
min-coverage-changed-files: 60
paths: |
${{ github.workspace }}/**/build/reports/jacoco/**/*Report.xml
token: ${{ secrets.GITHUB_TOKEN }}

- name: Upload local coverage reports (XML + HTML) (only API 30)
uses: actions/upload-artifact@v4
with:
name: coverage-reports
if-no-files-found: error
compression-level: 1
overwrite: false
path: '**/build/reports/jacoco/'

build:
needs: [ checks, dependency_guard, tests_and_lint ]
needs: [ checks, dependency_guard ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
Loading

0 comments on commit 466b245

Please sign in to comment.