Skip to content

Commit 7702fcb

Browse files
chore(workflows,fastlane): configure macOS App Store distribution for desktop app (lanes, workflow, screenshots) (openMF#2976)
1 parent f65ef09 commit 7702fcb

File tree

20 files changed

+308
-35
lines changed

20 files changed

+308
-35
lines changed

.github/workflows/monthly-release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,5 @@ concurrency:
6262
jobs:
6363
monthly_release:
6464
name: Tag Monthly Release
65-
uses: openMF/mifos-x-actionhub/.github/workflows/[email protected].0
65+
uses: openMF/mifos-x-actionhub/.github/workflows/[email protected].7
6666
secrets: inherit
Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
# GitHub Actions Workflow for Kotlin Multi-Platform Application Deployment
2+
#
3+
# OVERVIEW:
4+
# This workflow supports building and publishing applications across multiple platforms:
5+
# - Android (APK/AAB)
6+
# - iOS (IPA)
7+
# - Desktop (EXE, MSI, DMG, DEB)
8+
# - Web (GitHub Pages)
9+
#
10+
# PREREQUISITES:
11+
# Ensure your project is configured with:
12+
# - Gradle build system
13+
# - Kotlin Multiplatform Project with Android, iOS, Desktop, and Web modules
14+
# - Fastlane for deployment automation
15+
# - Separate modules/package names for each platform
16+
#
17+
# REQUIRED SECRETS:
18+
# Configure the following secrets in GitHub repository settings:
19+
# - ORIGINAL_KEYSTORE_FILE: Base64 encoded Android release keystore
20+
# - ORIGINAL_KEYSTORE_FILE_PASSWORD: Keystore password
21+
# - ORIGINAL_KEYSTORE_ALIAS: Keystore alias
22+
# - ORIGINAL_KEYSTORE_ALIAS_PASSWORD: Keystore alias password
23+
24+
# - UPLOAD_KEYSTORE_FILE: Base64 encoded Android release keystore
25+
# - UPLOAD_KEYSTORE_FILE_PASSWORD: Keystore password
26+
# - UPLOAD_KEYSTORE_ALIAS: Keystore alias
27+
# - UPLOAD_KEYSTORE_ALIAS_PASSWORD: Keystore alias password
28+
29+
# - GOOGLESERVICES: Google Services configuration JSON
30+
# - PLAYSTORECREDS: Play Store service account credentials
31+
# - FIREBASECREDS: Firebase distribution credentials
32+
33+
# - NOTARIZATION_APPLE_ID: Apple ID for macOS app notarization
34+
# - NOTARIZATION_PASSWORD: Notarization password
35+
# - NOTARIZATION_TEAM_ID: Apple developer team ID
36+
37+
# WORKFLOW INPUTS:
38+
# - release_type: 'internal' (default) or 'beta'
39+
# - target_branch: Branch to use for release (default: 'dev')
40+
# - android_package_name: Name of Android module
41+
# - ios_package_name: Name of iOS module
42+
# - desktop_package_name: Name of desktop module
43+
# - web_package_name: Name of web module
44+
# - publish_android: Enable/disable Android Play Store publishing
45+
# - build_ios: Enable/disable iOS build
46+
# - publish_ios: Enable/disable iOS App Store publishing
47+
48+
# USAGE:
49+
# 1. Ensure all required secrets are configured
50+
# 2. Customize package names in workflow inputs
51+
# 3. Toggle platform-specific publishing flags
52+
# 4. Trigger workflow manually or via GitHub Actions UI
53+
54+
# https://github.com/openMF/mifos-x-actionhub/blob/main/.github/workflows/multi-platform-build-and-publish.yaml
55+
56+
# ##############################################################################
57+
# DON'T EDIT THIS FILE UNLESS NECESSARY #
58+
# ##############################################################################
59+
name: Multi-Platform Build and Publish
60+
61+
on:
62+
workflow_dispatch:
63+
inputs:
64+
release_type:
65+
type: choice
66+
options:
67+
- internal
68+
- beta
69+
default: internal
70+
description: Release Type
71+
72+
target_branch:
73+
type: string
74+
default: 'development'
75+
description: 'Target branch for release'
76+
77+
distribute_ios_firebase:
78+
type: boolean
79+
default: false
80+
description: Distribute iOS App via Firebase App Distribution
81+
82+
distribute_ios_testflight:
83+
type: boolean
84+
default: false
85+
description: Distribute iOS App via TestFlight (App Store Connect)
86+
87+
distribute_ios_appstore:
88+
type: boolean
89+
default: false
90+
description: Distribute iOS App to Appstore
91+
92+
permissions:
93+
contents: write
94+
id-token: write
95+
pages: write
96+
97+
concurrency:
98+
group: "reusable"
99+
cancel-in-progress: false
100+
101+
jobs:
102+
multi_platform_build_and_publish:
103+
name: Multi-Platform Build and Publish
104+
uses: openMF/mifos-x-actionhub/.github/workflows/[email protected]
105+
with:
106+
java-version: 21
107+
release_type: ${{ inputs.release_type }}
108+
target_branch: ${{ inputs.target_branch }}
109+
android_package_name: 'cmp-android'
110+
ios_package_name: 'cmp-ios'
111+
desktop_package_name: 'cmp-desktop'
112+
web_package_name: 'cmp-web'
113+
tester_groups: 'mifos-mobile-apps'
114+
app_identifier: 'org.mifos.mobile'
115+
git_url: '[email protected]:openMF/ios-provisioning-profile.git'
116+
git_branch: 'mifos-mobile'
117+
match_type: 'adhoc'
118+
provisioning_profile_name: 'match AdHoc org.mifos.mobile'
119+
firebase_app_id: '1:728434912738:ios:ee2e0815a6915b351a1dbb'
120+
metadata_path: './fastlane/metadata/ios'
121+
use_cocoapods: true # <-- Set to true if using CocoaPods integration for KMP
122+
shared_module: ':cmp-shared' # <-- Gradle path to your shared KMP module (e.g., :shared)
123+
cmp_desktop_dir: 'cmp-desktop'
124+
keychain_name: signing.keychain-db # optional
125+
distribute_ios_firebase: ${{ inputs.distribute_ios_firebase }}
126+
distribute_ios_testflight: ${{ inputs.distribute_ios_testflight }}
127+
distribute_ios_appstore: ${{ inputs.distribute_ios_appstore }}
128+
secrets:
129+
original_keystore_file: ${{ secrets.ORIGINAL_KEYSTORE_FILE }}
130+
original_keystore_file_password: ${{ secrets.ORIGINAL_KEYSTORE_FILE_PASSWORD }}
131+
original_keystore_alias: ${{ secrets.ORIGINAL_KEYSTORE_ALIAS }}
132+
original_keystore_alias_password: ${{ secrets.ORIGINAL_KEYSTORE_ALIAS_PASSWORD }}
133+
134+
upload_keystore_file: ${{ secrets.UPLOAD_KEYSTORE_FILE }}
135+
upload_keystore_file_password: ${{ secrets.UPLOAD_KEYSTORE_FILE_PASSWORD }}
136+
upload_keystore_alias: ${{ secrets.UPLOAD_KEYSTORE_ALIAS }}
137+
upload_keystore_alias_password: ${{ secrets.UPLOAD_KEYSTORE_ALIAS_PASSWORD }}
138+
139+
notarization_apple_id: ${{ secrets.NOTARIZATION_APPLE_ID }}
140+
notarization_password: ${{ secrets.NOTARIZATION_PASSWORD }}
141+
notarization_team_id: ${{ secrets.NOTARIZATION_TEAM_ID }}
142+
keychain_password: ${{ secrets.KEYCHAIN_PASSWORD }}
143+
certificates_password: ${{ secrets.CERTIFICATES_PASSWORD }}
144+
mac_app_distribution_certificate_b64: ${{ secrets.MAC_APP_DISTRIBUTION_CERTIFICATE_B64 }}
145+
mac_installer_distribution_certificate_b64: ${{ secrets.MAC_INSTALLER_DISTRIBUTION_CERTIFICATE_B64 }}
146+
mac_embedded_provision_b64: ${{ secrets.MAC_EMBEDDED_PROVISION_B64 }}
147+
mac_runtime_provision_b64: ${{ secrets.MAC_RUNTIME_PROVISION_B64 }}
148+
appstore_key_id: ${{ secrets.APPSTORE_KEY_ID }}
149+
appstore_issuer_id: ${{ secrets.APPSTORE_ISSUER_ID }}
150+
appstore_auth_key: ${{ secrets.APPSTORE_AUTH_KEY }}
151+
match_password: ${{ secrets.MATCH_PASSWORD }}
152+
match_ssh_private_key: ${{ secrets.MATCH_SSH_PRIVATE_KEY }}
153+
154+
windows_signing_key: ${{ secrets.WINDOWS_SIGNING_KEY }}
155+
windows_signing_password: ${{ secrets.WINDOWS_SIGNING_PASSWORD }}
156+
windows_signing_certificate: ${{ secrets.WINDOWS_SIGNING_CERTIFICATE }}
157+
158+
macos_signing_key: ${{ secrets.MACOS_SIGNING_KEY }}
159+
macos_signing_password: ${{ secrets.MACOS_SIGNING_PASSWORD }}
160+
macos_signing_certificate: ${{ secrets.MACOS_SIGNING_CERTIFICATE }}
161+
162+
linux_signing_key: ${{ secrets.LINUX_SIGNING_KEY }}
163+
linux_signing_password: ${{ secrets.LINUX_SIGNING_PASSWORD }}
164+
linux_signing_certificate: ${{ secrets.LINUX_SIGNING_CERTIFICATE }}
165+
166+
google_services: ${{ secrets.GOOGLESERVICES }}
167+
firebase_creds: ${{ secrets.FIREBASECREDS }}
168+
playstore_creds: ${{ secrets.PLAYSTORECREDS }}
169+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/pr-check-kmp.yml renamed to .github/workflows/pr-check.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
### Workflow Jobs
1414
# 1. **Setup**: Prepares the build environment
1515
# - Checks out repository code
16-
# - Sets up Java 17
16+
# - Sets up Java (configurable; defaults to 17)
1717
# - Configures Gradle
1818
# - Manages dependency caching
1919
#
@@ -36,7 +36,7 @@
3636
# - Generates platform-specific executables and packages
3737
#
3838
### Prerequisites
39-
# - Java 17
39+
# - Java (configurable; default 17)
4040
# - Gradle
4141
# - Configured build scripts for:
4242
# - Android module
@@ -49,13 +49,19 @@
4949
### Configuration Parameters
5050
# The workflow requires two input parameters:
5151
#
52-
# | Parameter | Description | Type | Required |
53-
# |------------------------|------------------------------------|--------|----------|
54-
# | `android_package_name` | Name of the Android project module | String | Yes |
55-
# | `desktop_package_name` | Name of the Desktop project module | String | Yes |
52+
# | Parameter | Description | Type | Required |
53+
# |------------------------|------------------------------------|--------|-----------|
54+
# | `android_package_name` | Name of the Android project module | String | Yes |
55+
# | `desktop_package_name` | Name of the Desktop project module | String | Yes |
56+
# |`web_package_name` | Name of the Web (Kotlin/JS) project/module | String | No|
57+
# |`ios_package_name` | Name of the iOS project/module | String | No |
58+
# |`build_ios` | Build iOS targets as part of PR checks | Boolean | No |
59+
# |`use_cocoapods` | Use CocoaPods for iOS integration | Boolean | No |
60+
# |`shared_module | Path of the shared KMP module | String | (required when build_ios=true) |
61+
# |`java-version | Java version to use (configurable; defaults to 17)| No |
5662
#
5763

58-
# https://github.com/openMF/mifos-mobile-github-actions/blob/main/.github/workflows/pr-check.yaml
64+
# https://github.com/openMF/mifos-x-actionhub/blob/main/.github/workflows/pr-check.yaml
5965

6066
# ##############################################################################
6167
# DON'T EDIT THIS FILE UNLESS NECESSARY #
@@ -82,11 +88,14 @@ permissions:
8288
jobs:
8389
pr_checks:
8490
name: PR Checks KMP
85-
uses: openMF/mifos-x-actionhub/.github/workflows/[email protected].0
91+
uses: openMF/mifos-x-actionhub/.github/workflows/[email protected].7
8692
secrets: inherit
8793
with:
8894
android_package_name: 'cmp-android' # <-- Change Your Android Package Name
8995
desktop_package_name: 'cmp-desktop' # <-- Change Your Desktop Package Name
9096
web_package_name: 'cmp-web' # <-- Change Your Web Package Name
9197
ios_package_name: 'cmp-ios' # <-- Change Your iOS Package Name
9298
build_ios: true # <-- Change to 'false' if you don't want to build iOS
99+
use_cocoapods: true
100+
shared_module: ':cmp-shared'
101+
java-version: '21'

.github/workflows/promote-to-production.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,6 @@ jobs:
7070
# Job to promote app from beta to production in Play Store
7171
play_promote_production:
7272
name: Promote Beta to Production Play Store
73-
uses: openMF/mifos-x-actionhub/.github/workflows/promote-to-production.yaml@main
73+
uses: openMF/mifos-x-actionhub/.github/workflows/promote-to-production.yaml@v1.0.7
7474
secrets:
7575
playstore_creds: ${{ secrets.PLAYSTORECREDS }}

.github/workflows/tag-weekly-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ jobs:
1313
with:
1414
fetch-depth: 0
1515

16-
- name: Set up JDK 17
16+
- name: Set up JDK 21
1717
uses: actions/[email protected]
1818
with:
1919
distribution: 'temurin'
20-
java-version: '17'
20+
java-version: '21'
2121

2222
- name: Tag Weekly Release
2323
env:

.run/cmp-desktop.run.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
<component name="ProjectRunConfigurationManager">
22
<configuration default="false" name="cmp-desktop" type="GradleRunConfiguration" factoryName="Gradle">
33
<ExternalSystemSettings>
4+
<option name="env">
5+
<map>
6+
<entry key="DEVELOPER_DIR" value="/Applications/Xcode.app/Contents/Developer" />
7+
</map>
8+
</option>
49
<option name="executionName" />
510
<option name="externalProjectPath" value="$PROJECT_DIR$" />
611
<option name="externalSystemIdString" value="GRADLE" />

build-logic/convention/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ group = "org.mifos.mobile.buildlogic"
99
// Configure the build-logic plugins to target JDK 17
1010
// This matches the JDK used to build the project, and is not related to what is running on device.
1111
java {
12-
sourceCompatibility = JavaVersion.VERSION_17
13-
targetCompatibility = JavaVersion.VERSION_17
12+
sourceCompatibility = JavaVersion.VERSION_21
13+
targetCompatibility = JavaVersion.VERSION_21
1414
}
1515
tasks.withType<KotlinCompile>().configureEach {
1616
kotlinOptions {
17-
jvmTarget = JavaVersion.VERSION_17.toString()
17+
jvmTarget = JavaVersion.VERSION_21.toString()
1818
}
1919
}
2020

build-logic/convention/src/main/kotlin/org/mifos/mobile/Detekt.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import org.gradle.kotlin.dsl.named
88

99
internal fun Project.configureDetekt(extension: DetektExtension) = extension.apply {
1010
tasks.named<Detekt>("detekt") {
11-
jvmTarget = "17"
11+
jvmTarget = "21"
1212
source(files(rootDir))
1313
include("**/*.kt")
1414
exclude("**/*.kts")

build-logic/convention/src/main/kotlin/org/mifos/mobile/KotlinAndroid.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ internal fun Project.configureKotlinAndroid(
2828
compileOptions {
2929
// Up to Java 11 APIs are available through desugaring
3030
// https://developer.android.com/studio/write/java11-minimal-support-table
31-
sourceCompatibility = JavaVersion.VERSION_17
32-
targetCompatibility = JavaVersion.VERSION_17
31+
sourceCompatibility = JavaVersion.VERSION_21
32+
targetCompatibility = JavaVersion.VERSION_21
3333
isCoreLibraryDesugaringEnabled = true
3434
}
3535
}
@@ -48,8 +48,8 @@ internal fun Project.configureKotlinJvm() {
4848
extensions.configure<JavaPluginExtension> {
4949
// Up to Java 11 APIs are available through desugaring
5050
// https://developer.android.com/studio/write/java11-minimal-support-table
51-
sourceCompatibility = JavaVersion.VERSION_17
52-
targetCompatibility = JavaVersion.VERSION_17
51+
sourceCompatibility = JavaVersion.VERSION_21
52+
targetCompatibility = JavaVersion.VERSION_21
5353
}
5454

5555
configureKotlin()
@@ -62,8 +62,8 @@ private fun Project.configureKotlin() {
6262
// Use withType to workaround https://youtrack.jetbrains.com/issue/KT-55947
6363
tasks.withType<KotlinCompile>().configureEach {
6464
compilerOptions {
65-
// Set JVM target to 17
66-
jvmTarget = JvmTarget.JVM_17
65+
// Set JVM target to 21
66+
jvmTarget = JvmTarget.JVM_21
6767
// Treat all Kotlin warnings as errors (disabled by default)
6868
// Override by setting warningsAsErrors=true in your ~/.gradle/gradle.properties
6969
val warningsAsErrors: String? by project

0 commit comments

Comments
 (0)