Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
65 changes: 65 additions & 0 deletions .github/workflows/build-and-deploy-site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# This workflow is designed to automate the process of building and deploying a Kotlin/JS web application to GitHub Pages.
# It ensures that whenever changes are merged into the dev branch or when manually triggered, the web application is built,
# packaged, and deployed to the GitHub Pages environment, making it accessible online.

# Key Features:
# - Automated web application build using Kotlin/JS
# - Deployment to GitHub Pages
# - Supports configurable web project module name
# - Manages deployment concurrency and environment settings
# - Provides secure deployment with proper permissions

# Prerequisites:
# - Kotlin Multiplatform/JS project configured with Gradle
# - Web module set up for browser distribution
# - Java 17 or compatible version
# - GitHub Pages enabled in repository settings

# Workflow Configuration:
# - Requires input of `web_package_name` to specify the web project module
# - Uses Windows runner for build process
# - Leverages GitHub Actions for build, pages configuration, and deployment

# Workflow Triggers:
# - Can be manually called from other workflows
# - Supports workflow_call for reusability across projects

# Deployment Process:
# 1. Checkout repository code
# 2. Set up Java development environment
# 3. Build Kotlin/JS web application
# 4. Configure GitHub Pages
# 5. Upload built artifacts
# 6. Deploy to GitHub Pages

# https://github.com/openMF/mifos-x-actionhub/blob/main/.github/workflows/build-and-deploy-site.yaml

# ##############################################################################
# DON'T EDIT THIS FILE UNLESS NECESSARY #
# ##############################################################################

name: Build And Deploy Web App

# Trigger conditions for the workflow
on:
workflow_dispatch:

# Concurrency settings to manage multiple workflow runs
# This ensures orderly deployment to production environment
concurrency:
group: "web-pages"
cancel-in-progress: false

permissions:
contents: read # Read repository contents
pages: write # Write to GitHub Pages
id-token: write # Write authentication tokens
pull-requests: write # Write to pull requests

jobs:
build_and_deploy_web:
name: Build And Deploy Web App
uses: openMF/mifos-x-actionhub/.github/workflows/build-and-deploy-site.yaml@v1.0.8
secrets: inherit
with:
web_package_name: 'cmp-web' # <-- Change with your web package name
15 changes: 15 additions & 0 deletions .github/workflows/cache-cleanup.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Cleanup Cache

on:
pull_request:
types: [ closed ]
workflow_dispatch:

jobs:
cleanup:
uses: openMF/mifos-x-actionhub/.github/workflows/cache-cleanup.yaml@v1.0.8
with:
cleanup_pr: ${{ github.event_name == 'pull_request' && github.event.repository.private == true }}
cleanup_all: ${{ github.event_name == 'workflow_dispatch' }}
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
66 changes: 66 additions & 0 deletions .github/workflows/monthly-version-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Automated Monthly Release Versioning Workflow
# ============================================

# Purpose:
# - Automatically create consistent monthly version tags
# - Implement a calendar-based versioning strategy
# - Facilitate easy tracking of monthly releases

# Versioning Strategy:
# - Tag format: YYYY.MM.0 (e.g., 2024.01.0 for January 2024)
# - First digit: Full year
# - Second digit: Month (01-12)
# - Third digit: Patch version (starts at 0, allows for potential updates)

# Key Features:
# - Runs automatically on the first day of each month at 3:30 AM UTC
# - Can be manually triggered via workflow_dispatch
# - Uses GitHub Actions to generate tags programmatically
# - Provides a predictable and systematic versioning approach

# Prerequisites:
# - Repository configured with GitHub Actions
# - Permissions to create tags
# - Access to actions/checkout and tag creation actions

# Workflow Triggers:
# - Scheduled monthly run
# - Manual workflow dispatch
# - Callable from other workflows

# Actions Used:
# 1. actions/checkout@v4 - Checks out repository code
# 2. josStorer/get-current-time - Retrieves current timestamp
# 3. rickstaa/action-create-tag - Creates Git tags

# Example Generated Tags:
# - 2024.01.0 (January 2024 initial release)
# - 2024.02.0 (February 2024 initial release)
# - 2024.02.1 (Potential patch for February 2024)

# https://github.com/openMF/mifos-x-actionhub/blob/main/.github/workflows/monthly-version-tag.yaml

# ##############################################################################
# DON'T EDIT THIS FILE UNLESS NECESSARY #
# ##############################################################################

name: Tag Monthly Release

on:
# Allow manual triggering of the workflow
workflow_dispatch:
# Schedule the workflow to run monthly
schedule:
# Runs at 03:30 UTC on the first day of every month
# Cron syntax: minute hour day-of-month month day-of-week
- cron: '30 3 1 * *'

concurrency:
group: "monthly-release"
cancel-in-progress: false

jobs:
monthly_release:
name: Tag Monthly Release
uses: openMF/mifos-x-actionhub/.github/workflows/monthly-version-tag.yaml@v1.0.8
secrets: inherit
38 changes: 5 additions & 33 deletions .github/workflows/multi-platform-build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,6 @@ on:
default: false
description: Distribute iOS App to Appstore

distribute_macos_testflight:
type: boolean
default: false
description: Distribute macOS App via TestFlight (App Store Connect)

distribute_macos_appstore:
type: boolean
default: false
description: Distribute macOS App to Appstore

permissions:
contents: write
id-token: write
Expand All @@ -111,32 +101,20 @@ concurrency:
jobs:
multi_platform_build_and_publish:
name: Multi-Platform Build and Publish
uses: openMF/mifos-x-actionhub/.github/workflows/multi-platform-build-and-publish.yaml@v1.0.7
uses: openMF/mifos-x-actionhub/.github/workflows/multi-platform-build-and-publish.yaml@v1.0.8
with:
java-version: 21
release_type: ${{ inputs.release_type }}
target_branch: ${{ inputs.target_branch }}
android_package_name: 'cmp-android'
ios_package_name: 'cmp-ios'
desktop_package_name: 'cmp-desktop'
web_package_name: 'cmp-web'
tester_groups: 'mifos-mobile-apps'
app_identifier: 'org.mifos.mobile'
git_url: 'git@github.com:openMF/ios-provisioning-profile.git'
git_branch: 'mifos-mobile'
match_type: 'adhoc'
provisioning_profile_name: 'match AdHoc org.mifos.mobile'
firebase_app_id: '1:728434912738:ios:ee2e0815a6915b351a1dbb'
metadata_path: './fastlane/metadata/ios'
use_cocoapods: true # <-- Set to true if using CocoaPods integration for KMP
shared_module: ':cmp-shared' # <-- Gradle path to your shared KMP module (e.g., :shared)
cmp_desktop_dir: 'cmp-desktop'
keychain_name: signing.keychain-db # optional
metadata_path: './fastlane/metadata'
use_cocoapods: true
shared_module: ':cmp-shared'
distribute_ios_firebase: ${{ inputs.distribute_ios_firebase }}
distribute_ios_testflight: ${{ inputs.distribute_ios_testflight }}
distribute_ios_appstore: ${{ inputs.distribute_ios_appstore }}
distribute_macos_testflight: ${{ inputs.distribute_macos_testflight }}
distribute_macos_appstore: ${{ inputs.distribute_macos_appstore }}
secrets:
original_keystore_file: ${{ secrets.ORIGINAL_KEYSTORE_FILE }}
original_keystore_file_password: ${{ secrets.ORIGINAL_KEYSTORE_FILE_PASSWORD }}
Expand All @@ -151,12 +129,6 @@ jobs:
notarization_apple_id: ${{ secrets.NOTARIZATION_APPLE_ID }}
notarization_password: ${{ secrets.NOTARIZATION_PASSWORD }}
notarization_team_id: ${{ secrets.NOTARIZATION_TEAM_ID }}
keychain_password: ${{ secrets.KEYCHAIN_PASSWORD }}
certificates_password: ${{ secrets.CERTIFICATES_PASSWORD }}
mac_app_distribution_certificate_b64: ${{ secrets.MAC_APP_DISTRIBUTION_CERTIFICATE_B64 }}
mac_installer_distribution_certificate_b64: ${{ secrets.MAC_INSTALLER_DISTRIBUTION_CERTIFICATE_B64 }}
mac_embedded_provision_b64: ${{ secrets.MAC_EMBEDDED_PROVISION_B64 }}
mac_runtime_provision_b64: ${{ secrets.MAC_RUNTIME_PROVISION_B64 }}
appstore_key_id: ${{ secrets.APPSTORE_KEY_ID }}
appstore_issuer_id: ${{ secrets.APPSTORE_ISSUER_ID }}
appstore_auth_key: ${{ secrets.APPSTORE_AUTH_KEY }}
Expand All @@ -178,4 +150,4 @@ jobs:
google_services: ${{ secrets.GOOGLESERVICES }}
firebase_creds: ${{ secrets.FIREBASECREDS }}
playstore_creds: ${{ secrets.PLAYSTORECREDS }}
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
27 changes: 10 additions & 17 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
### Workflow Jobs
# 1. **Setup**: Prepares the build environment
# - Checks out repository code
# - Sets up Java (configurable; defaults to 17)
# - Sets up Java 17
# - Configures Gradle
# - Manages dependency caching
#
Expand All @@ -36,7 +36,7 @@
# - Generates platform-specific executables and packages
#
### Prerequisites
# - Java (configurable; default 17)
# - Java 17
# - Gradle
# - Configured build scripts for:
# - Android module
Expand All @@ -49,16 +49,10 @@
### Configuration Parameters
# The workflow requires two input parameters:
#
# | Parameter | Description | Type | Required |
# |------------------------|------------------------------------|--------|-----------|
# | `android_package_name` | Name of the Android project module | String | Yes |
# | `desktop_package_name` | Name of the Desktop project module | String | Yes |
# |`web_package_name` | Name of the Web (Kotlin/JS) project/module | String | No|
# |`ios_package_name` | Name of the iOS project/module | String | No |
# |`build_ios` | Build iOS targets as part of PR checks | Boolean | No |
# |`use_cocoapods` | Use CocoaPods for iOS integration | Boolean | No |
# |`shared_module | Path of the shared KMP module | String | (required when build_ios=true) |
# |`java-version | Java version to use (configurable; defaults to 17)| No |
# | Parameter | Description | Type | Required |
# |------------------------|------------------------------------|--------|----------|
# | `android_package_name` | Name of the Android project module | String | Yes |
# | `desktop_package_name` | Name of the Desktop project module | String | Yes |
#

# https://github.com/openMF/mifos-x-actionhub/blob/main/.github/workflows/pr-check.yaml
Expand All @@ -68,7 +62,7 @@
# ##############################################################################


name: PR Checks for KMP
name: PR Checks

# Trigger conditions for the workflow
on:
Expand All @@ -79,17 +73,16 @@ on:

# Concurrency settings to prevent multiple simultaneous workflow runs
concurrency:
group: pr-kmp-${{ github.ref }}
group: pr-${{ github.ref }}
cancel-in-progress: true # Cancels previous runs if a new one is triggered

permissions:
contents: write

jobs:
pr_checks:
name: PR Checks KMP
uses: openMF/mifos-x-actionhub/.github/workflows/pr-check.yaml@v1.0.7
secrets: inherit
name: PR Checks
uses: openMF/mifos-x-actionhub/.github/workflows/pr-check.yaml@v1.0.8
with:
android_package_name: 'cmp-android' # <-- Change Your Android Package Name
desktop_package_name: 'cmp-desktop' # <-- Change Your Desktop Package Name
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/promote-to-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
# end
# ```

# https://github.com/openMF/mifos-mobile-github-actions/blob/main/.github/workflows/promote-to-production.yaml
# https://github.com/openMF/mifos-x-actionhub/blob/main/.github/workflows/promote-to-production.yaml

# ##############################################################################
# DON'T EDIT THIS FILE UNLESS NECESSARY #
Expand All @@ -70,6 +70,6 @@ jobs:
# Job to promote app from beta to production in Play Store
play_promote_production:
name: Promote Beta to Production Play Store
uses: openMF/mifos-x-actionhub/.github/workflows/promote-to-production.yaml@v1.0.7
uses: openMF/mifos-x-actionhub/.github/workflows/promote-to-production.yaml@v1.0.8
secrets:
playstore_creds: ${{ secrets.PLAYSTORECREDS }}
Loading
Loading