Skip to content

Commit 4ae9b42

Browse files
Merge pull request #41 from HekmatullahAmin/MXAH-11
add macOS build & distribution (TestFlight + Mac App Store) to Multiplatform Build & Publish; add xcode-version input
2 parents e838d40 + 5cb2177 commit 4ae9b42

File tree

7 files changed

+207
-31
lines changed

7 files changed

+207
-31
lines changed

.github/workflows/build-and-deploy-site.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
# jobs:
6262
# build_and_deploy_web:
6363
# name: Build And Deploy Web App
64-
# uses: openMF/mifos-x-actionhub/.github/workflows/[email protected].5
64+
# uses: openMF/mifos-x-actionhub/.github/workflows/[email protected].6
6565
# secrets: inherit
6666
# with:
6767
# web_package_name: 'mifospay-web'

.github/workflows/monthly-version-tag.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
# jobs:
6161
# monthly_release:
6262
# name: Tag Monthly Release
63-
# uses: openMF/mifos-x-actionhub/.github/workflows/[email protected].5
63+
# uses: openMF/mifos-x-actionhub/.github/workflows/[email protected].6
6464
# secrets: inherit
6565
# ```
6666

.github/workflows/multi-platform-build-and-publish.yaml

Lines changed: 113 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ on:
9090
default: '17'
9191
type: string
9292

93+
xcode-version:
94+
description: 'Xcode version to use (e.g., 16.4).'
95+
required: false
96+
default: '16.4'
97+
type: string
98+
9399
release_type:
94100
type: string
95101
default: 'internal'
@@ -138,6 +144,16 @@ on:
138144
default: false
139145
description: Distribute iOS App to Appstore
140146

147+
distribute_macos_testflight:
148+
type: boolean
149+
default: false
150+
description: Distribute macOS App via TestFlight (App Store Connect)
151+
152+
distribute_macos_appstore:
153+
type: boolean
154+
default: false
155+
description: Distribute macOS App to Appstore
156+
141157
tester_groups:
142158
type: string
143159
description: 'Firebase Tester Group'
@@ -205,6 +221,22 @@ on:
205221
type: string
206222
default: 'cmp-shared/build/compose/cocoapods/compose-resources'
207223

224+
macos_app_identifier:
225+
description: 'Bundle identifier for the macOS app'
226+
type: string
227+
required: true
228+
229+
cmp_desktop_dir:
230+
description: 'Path to the Compose/KMP desktop project used for macOS build'
231+
type: string
232+
default: 'cmp-desktop'
233+
234+
keychain_name:
235+
description: 'Temporary keychain name for codesigning (optional)'
236+
type: string
237+
default: 'signing.keychain-db'
238+
239+
208240
secrets:
209241
# Android-related secrets
210242
original_keystore_file:
@@ -273,6 +305,31 @@ on:
273305
description: 'SSH private key for accessing the certificates repository'
274306
required: true
275307

308+
# macOS related secrets
309+
keychain_password:
310+
description: 'Password for the temporary signing keychain'
311+
required: true
312+
313+
certificates_password:
314+
description: 'Password used to import signing certificates to the keychain'
315+
required: true
316+
317+
mac_app_distribution_certificate_b64:
318+
description: 'Base64 App Distribution certificate (.p12) for macOS'
319+
required: true
320+
321+
mac_installer_distribution_certificate_b64:
322+
description: 'Base64 Installer Distribution certificate (.p12) for macOS'
323+
required: true
324+
325+
mac_embedded_provision_b64:
326+
description: 'Base64 embedded provisioning profile (.provisionprofile) for macOS'
327+
required: true
328+
329+
mac_runtime_provision_b64:
330+
description: 'Base64 runtime provisioning profile (.provisionprofile) for macOS'
331+
required: true
332+
276333
# Desktop signing secrets
277334
windows_signing_key:
278335
description: 'Windows app signing key'
@@ -377,7 +434,7 @@ jobs:
377434
- name: Set latest Xcode version
378435
uses: maxim-lobanov/setup-xcode@v1
379436
with:
380-
xcode-version: latest-stable
437+
xcode-version: ${{ inputs.xcode-version }}
381438

382439
- name: Install CocoaPods
383440
if: ${{ inputs.use_cocoapods }}
@@ -424,7 +481,7 @@ jobs:
424481
- name: Set latest Xcode version
425482
uses: maxim-lobanov/setup-xcode@v1
426483
with:
427-
xcode-version: latest-stable
484+
xcode-version: ${{ inputs.xcode-version }}
428485

429486
- name: Install CocoaPods
430487
if: ${{ inputs.use_cocoapods }}
@@ -466,7 +523,7 @@ jobs:
466523
- name: Set latest Xcode version
467524
uses: maxim-lobanov/setup-xcode@v1
468525
with:
469-
xcode-version: latest-stable
526+
xcode-version: ${{ inputs.xcode-version }}
470527

471528
- name: Install CocoaPods
472529
if: ${{ inputs.use_cocoapods }}
@@ -494,8 +551,58 @@ jobs:
494551
match_password: ${{ secrets.match_password }}
495552
match_ssh_private_key: ${{ secrets.match_ssh_private_key }}
496553

497-
# Desktop Publishing Job
498-
publish_desktop:
554+
publish_macos_app_to_testflight:
555+
name: Publish macOS App On TestFlight
556+
if: inputs.distribute_macos_testflight
557+
runs-on: macos-latest
558+
steps:
559+
- name: Checkout Repository
560+
uses: actions/checkout@v4
561+
562+
- name: Upload macOS to TestFlight
563+
uses: openMF/mifos-x-actionhub-publish-macos-on-appstore-testflight-kmp@v1.0.0
564+
with:
565+
app_identifier: ${{ inputs.macos_app_identifier }}
566+
cmp_desktop_dir: ${{ inputs.cmp_desktop_dir }}
567+
keychain_name: ${{ inputs.keychain_name }}
568+
java_version: ${{ inputs.java-version }}
569+
keychain_password: ${{ secrets.keychain_password }}
570+
certificates_password: ${{ secrets.certificates_password }}
571+
mac_app_distribution_certificate_b64: ${{ secrets.mac_app_distribution_certificate_b64 }}
572+
mac_installer_distribution_certificate_b64: ${{ secrets.mac_installer_distribution_certificate_b64 }}
573+
mac_embedded_provision_b64: ${{ secrets.mac_embedded_provision_b64 }}
574+
mac_runtime_provision_b64: ${{ secrets.mac_runtime_provision_b64 }}
575+
appstore_key_id: ${{ secrets.appstore_key_id }}
576+
appstore_issuer_id: ${{ secrets.appstore_issuer_id }}
577+
appstore_auth_key_b64: ${{ secrets.appstore_auth_key }}
578+
579+
publish_macos_app_to_appstore:
580+
name: Publish macOS App On App Store
581+
if: inputs.distribute_macos_appstore
582+
runs-on: macos-latest
583+
steps:
584+
- name: Checkout Repository
585+
uses: actions/checkout@v4
586+
587+
- name: Submit macOS App to App Store
588+
uses: openMF/[email protected]
589+
with:
590+
app_identifier: ${{ inputs.macos_app_identifier }}
591+
cmp_desktop_dir: ${{ inputs.cmp_desktop_dir }}
592+
keychain_name: ${{ inputs.keychain_name }}
593+
java_version: ${{ inputs.java-version }}
594+
keychain_password: ${{ secrets.keychain_password }}
595+
certificates_password: ${{ secrets.certificates_password }}
596+
mac_app_distribution_certificate_b64: ${{ secrets.mac_app_distribution_certificate_b64 }}
597+
mac_installer_distribution_certificate_b64: ${{ secrets.mac_installer_distribution_certificate_b64 }}
598+
mac_embedded_provision_b64: ${{ secrets.mac_embedded_provision_b64 }}
599+
mac_runtime_provision_b64: ${{ secrets.mac_runtime_provision_b64 }}
600+
appstore_key_id: ${{ secrets.appstore_key_id }}
601+
appstore_issuer_id: ${{ secrets.appstore_issuer_id }}
602+
appstore_auth_key_b64: ${{ secrets.appstore_auth_key }}
603+
604+
# Desktop Publishing Job (Distribute desktop app builds outside official stores)
605+
publish_desktop_external:
499606
name: Publish Desktop App
500607
strategy:
501608
matrix:
@@ -545,7 +652,7 @@ jobs:
545652
# Creates GitHub release with all built artifacts
546653
github_release:
547654
name: Create Github Release
548-
needs: [ publish_android_on_firebase, publish_ios_app_to_firebase, publish_desktop, publish_web ]
655+
needs: [ publish_android_on_firebase, publish_ios_app_to_firebase, publish_desktop_external, publish_web ]
549656
runs-on: macos-latest
550657
steps:
551658
- uses: actions/checkout@v4

.github/workflows/pr-check-android.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
# jobs:
7070
# pr_checks:
7171
# name: PR Checks
72-
# uses: openMF/mifos-x-actionhub/.github/workflows/[email protected].5
72+
# uses: openMF/mifos-x-actionhub/.github/workflows/[email protected].6
7373
# secrets: inherit
7474
# with:
7575
# android_package_name: 'mifospay-android'

.github/workflows/pr-check.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
# | `use_cocoapods` | Whether to use CocoaPods for integrating the shared module into the iOS app | Boolean | Required **if `build_ios` = true** |
6060
# | `shared_module` | Gradle path to the shared Kotlin Multiplatform module used in the iOS app (e.g., :cmp-shared, :shared) | String | Required **if `build_ios` = true** |
6161
# | `java-version` | Java version to use (e.g., 17, 21) | String | No |
62+
# | `xcode-version`| Xcode version to use (e.g., 16.4) | String | No |
6263
#
6364
### Usage Example
6465
# ```yaml
@@ -80,7 +81,7 @@
8081
# jobs:
8182
# pr_checks:
8283
# name: PR Checks
83-
# uses: openMF/mifos-x-actionhub/.github/workflows/[email protected].5
84+
# uses: openMF/mifos-x-actionhub/.github/workflows/[email protected].6
8485
# with:
8586
# android_package_name: 'cmp-android' # <-- Change Your Android Package Name
8687
# desktop_package_name: 'cmp-desktop' # <-- Change Your Desktop Package Name
@@ -106,6 +107,12 @@ on:
106107
required: false
107108
default: '17'
108109

110+
xcode-version:
111+
description: 'Xcode version to use (e.g., 16.4).'
112+
required: false
113+
default: '16.4'
114+
type: string
115+
109116
android_package_name:
110117
description: 'Name of the Android project module'
111118
type: string
@@ -232,7 +239,7 @@ jobs:
232239
- name: Setup latest Xcode version
233240
uses: maxim-lobanov/setup-xcode@v1
234241
with:
235-
xcode-version: latest-stable
242+
xcode-version: ${{ inputs.xcode-version }}
236243

237244
- name: Install CocoaPods
238245
if: ${{ inputs.use_cocoapods }}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
# # Job to promote app from beta to production in Play Store
6868
# play_promote_production:
6969
# name: Promote Beta to Production Play Store
70-
# uses: openMF/mifos-x-actionhub/.github/workflows/[email protected].5
70+
# uses: openMF/mifos-x-actionhub/.github/workflows/[email protected].6
7171
# if: ${{ inputs.publish_to_play_store == true }}
7272
# secrets: inherit
7373
# with:

0 commit comments

Comments
 (0)