Skip to content

Commit 53a8602

Browse files
chore: update iOS workflows to use latest Fastlane actions and sync README accordingly (#33)
1 parent 2c915aa commit 53a8602

File tree

3 files changed

+83
-79
lines changed

3 files changed

+83
-79
lines changed

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

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@
3636
# - notarization_apple_id: Apple ID for macOS app notarization
3737
# - notarization_password: Notarization password
3838
# - notarization_team_id: Apple developer team ID
39+
# - appstore_key_id: Key ID from App Store Connect API Key
40+
# - appstore_issuer_id: Issuer ID from App Store Connect API Key
41+
# - appstore_auth_key: Base64-encoded contents of the .p8 auth key file
42+
# - match_password: Password used to encrypt/decrypt the certificates repository used by match
43+
# - match_ssh_private_key: SSH private key for accessing the certificates repository
3944
#
4045
# Windows signing secrets:
4146
# - windows_signing_key: Windows app signing key
@@ -328,25 +333,28 @@ jobs:
328333
permissions:
329334
contents: write
330335
steps:
331-
- name: Set Xcode version 16.2
336+
- name: Set latest Xcode version
332337
uses: maxim-lobanov/setup-xcode@v1
333338
with:
334-
xcode-version: '16.2'
339+
xcode-version: latest-stable
335340

336341
- name: Checkout Repository
337342
uses: actions/checkout@v4
338343
with:
339344
fetch-depth: 0
340345

341346
- name: Deploy iOS App to Firebase
342-
uses: openMF/[email protected].0
347+
uses: openMF/[email protected].2
343348
continue-on-error: true
344349
with:
345350
app_identifier: ${{ inputs.app_identifier }}
346351
git_url: ${{ inputs.git_url }}
347352
git_branch: ${{ inputs.git_branch }}
348353
match_type: ${{ inputs.match_type }}
349354
provisioning_profile_name: ${{ inputs.provisioning_profile_name }}
355+
appstore_key_id: ${{ secrets.appstore_key_id }}
356+
appstore_issuer_id: ${{ secrets.appstore_issuer_id }}
357+
appstore_auth_key: ${{ secrets.appstore_auth_key }}
350358
match_password: ${{ secrets.match_password }}
351359
match_ssh_private_key: ${{ secrets.match_ssh_private_key }}
352360
ios_package_name: ${{ inputs.ios_package_name }}
@@ -360,16 +368,16 @@ jobs:
360368
if: inputs.distribute_ios_testflight
361369
runs-on: macos-latest
362370
steps:
363-
- name: Set Xcode version 16.2
371+
- name: Set latest Xcode version
364372
uses: maxim-lobanov/setup-xcode@v1
365373
with:
366-
xcode-version: '16.2'
374+
xcode-version: latest-stable
367375

368376
- name: Checkout Repository
369377
uses: actions/checkout@v4
370378

371379
- name: Deploy iOS app to TestFlight
372-
uses: openMF/mifos-x-actionhub-publish-ios-on-appstore-production@main
380+
uses: openMF/mifos-x-actionhub-publish-ios-on-appstore-production@v1.0.0
373381
with:
374382
app_identifier: ${{ inputs.app_identifier }}
375383
git_url: ${{ inputs.git_url }}
@@ -388,10 +396,10 @@ jobs:
388396
if: inputs.distribute_ios_appstore
389397
runs-on: macos-latest
390398
steps:
391-
- name: Set Xcode version 16.2
399+
- name: Set latest Xcode version
392400
uses: maxim-lobanov/setup-xcode@v1
393401
with:
394-
xcode-version: '16.2'
402+
xcode-version: latest-stable
395403

396404
- name: Checkout Repository
397405
uses: actions/checkout@v4

.github/workflows/pr-check.yaml

Lines changed: 6 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -115,45 +115,6 @@ on:
115115
required: false
116116
default: true
117117

118-
git_url:
119-
description: 'Git URL to the private repository containing certificates and provisioning profiles for code signing (used by Fastlane Match)'
120-
type: string
121-
required: false
122-
default: '[email protected]:openMF/ios-provisioning-profile.git'
123-
124-
git_branch:
125-
description: 'Branch name inside the certificates repository that Fastlane Match should use to fetch signing assets'
126-
type: string
127-
required: false
128-
default: 'master'
129-
130-
match_type:
131-
description: 'Specifies the type of provisioning profile to use for code signing (e.g., adhoc, appstore, development)'
132-
type: string
133-
required: false
134-
default: 'adhoc'
135-
136-
app_identifier:
137-
description: 'The bundle identifier used to uniquely identify your iOS application'
138-
type: string
139-
required: false
140-
default: 'org.mifos.kmp.template'
141-
142-
provisioning_profile_name:
143-
description: 'Name of the Provisioning profile to use for code signing'
144-
type: string
145-
required: false
146-
default: 'match AdHoc org.mifos.kmp.template'
147-
148-
secrets:
149-
match_ssh_private_key:
150-
description: 'SSH private key for accessing the certificates repository'
151-
required: true
152-
153-
match_password:
154-
description: 'Encryption passphrase used by Fastlane Match to decrypt the signing certificates and provisioning profiles stored in the remote repository'
155-
required: true
156-
157118
# Concurrency settings to prevent multiple simultaneous workflow runs
158119
concurrency:
159120
group: build-${{ github.ref }}
@@ -223,14 +184,11 @@ jobs:
223184
- name: Checkout Repository
224185
uses: actions/checkout@v4
225186

187+
- name: Setup latest Xcode version
188+
uses: maxim-lobanov/setup-xcode@v1
189+
with:
190+
xcode-version: latest-stable
191+
226192
- name: Build iOS App
227193
if: ${{ inputs.build_ios }}
228-
uses: openMF/mifos-x-actionhub-build-ios-app@main
229-
with:
230-
match_ssh_private_key: ${{ secrets.match_ssh_private_key}}
231-
match_password: ${{ secrets.match_password }}
232-
git_url: ${{ inputs.git_url }}
233-
git_branch: ${{ inputs.git_branch }}
234-
match_type: ${{ inputs.match_type }}
235-
app_identifier: ${{ inputs.app_identifier }}
236-
provisioning_profile_name: ${{ inputs.provisioning_profile_name }}
194+
uses: openMF/[email protected]

README.md

Lines changed: 61 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,8 @@ platform :ios do
341341
app_store_connect_api_key(
342342
key_id: options[:appstore_key_id] || "HA469T6757",
343343
issuer_id: options[:appstore_issuer_id] || "8er9e361-9603-4c3e-b147-be3b1o816099",
344-
key_filepath: options[:key_filepath] || "./secrets/Auth_Key.p8"
344+
key_filepath: options[:key_filepath] || "./secrets/Auth_Key.p8",
345+
duration: 1200
345346
)
346347
end
347348

@@ -352,7 +353,9 @@ platform :ios do
352353
readonly: true,
353354
git_url: options[:git_url] || "[email protected]:openMF/ios-provisioning-profile.git",
354355
git_branch: options[:git_branch] || "master",
355-
git_private_key: options[:git_private_key] || "./secrets/match_ci_key"
356+
git_private_key: options[:git_private_key] || "./secrets/match_ci_key",
357+
force_for_new_devices: true,
358+
api_key: Actions.lane_context[SharedValues::APP_STORE_CONNECT_API_KEY]
356359
)
357360
end
358361

@@ -380,9 +383,27 @@ platform :ios do
380383

381384
desc "Build Ios application"
382385
lane :build_ios do |options|
383-
setup_ci_if_needed
384-
fetch_certificates_with_match(options)
385-
build_ios_project(options)
386+
options[:scheme] ||= "iosApp"
387+
options[:project_path] ||= "cmp-ios/iosApp.xcodeproj"
388+
options[:output_name] ||= "iosApp.ipa"
389+
options[:output_directory] ||= "cmp-ios/build"
390+
391+
build_ios_app(
392+
scheme: options[:scheme],
393+
project: options[:project_path],
394+
output_name: options[:output_name],
395+
output_directory: options[:output_directory],
396+
skip_codesigning: true,
397+
skip_archive: true
398+
)
399+
end
400+
401+
desc "Build Signed Ios application"
402+
lane :build_signed_ios do |options|
403+
setup_ci_if_needed
404+
load_api_key(options)
405+
fetch_certificates_with_match(options)
406+
build_ios_project(options)
386407
end
387408

388409
desc "Increment build number from latest Firebase release"
@@ -421,7 +442,7 @@ platform :ios do
421442

422443
increment_version(serviceCredsFile: service_file)
423444

424-
build_ios(
445+
build_signed_ios(
425446
options.merge(
426447
match_type: "adhoc",
427448
provisioning_profile_name: "match AdHoc com.example.9af3c1d2"
@@ -497,20 +518,50 @@ platform :ios do
497518
xcodeproj: "cmp-ios/iosApp.xcodeproj",
498519
build_number: latest_build_number + 1
499520
)
521+
522+
update_plist(
523+
plist_path: "cmp-ios/iosApp/Info.plist",
524+
block: proc do |plist|
525+
plist['NSContactsUsageDescription'] = 'This app requires access to your contacts to enable autofill and collaboration features.'
526+
plist['NSLocationWhenInUseUsageDescription'] = 'This app does not use your location to suggest services near you.'
527+
plist['NSBluetoothAlwaysUsageDescription'] = 'This app does not use Bluetooth to communicate with nearby devices.'
528+
end
529+
)
500530

501531
build_ios_project(
502532
options.merge(
503533
provisioning_profile_name: "match AppStore com.example.9af3c1d2"
504534
)
505535
)
506-
536+
507537
deliver(
508538
metadata_path: options[:metadata_path] || "./fastlane/metadata",
509-
automatic_release: false,
539+
submit_for_review: true,
540+
automatic_release: true,
510541
api_key: Actions.lane_context[SharedValues::APP_STORE_CONNECT_API_KEY],
511542
skip_app_version_update: true,
512543
force: true,
513-
precheck_include_in_app_purchases: false
544+
precheck_include_in_app_purchases: false,
545+
overwrite_screenshots: true,
546+
app_rating_config_path: options[:app_rating_config_path] || "./fastlane/age_rating.json",
547+
submission_information: {
548+
add_id_info_uses_idfa: false,
549+
add_id_info_limits_tracking: false,
550+
add_id_info_serves_ads: false,
551+
add_id_info_tracks_action: false,
552+
add_id_info_tracks_install: false,
553+
content_rights_has_rights: true,
554+
content_rights_contains_third_party_content: false,
555+
export_compliance_platform: 'ios',
556+
export_compliance_compliance_required: false,
557+
export_compliance_encryption_updated: false,
558+
export_compliance_app_type: nil,
559+
export_compliance_uses_encryption: false,
560+
export_compliance_is_exempt: true,
561+
export_compliance_contains_third_party_cryptography: false,
562+
export_compliance_contains_proprietary_cryptography: false,
563+
export_compliance_available_on_french_store: true
564+
}
514565
)
515566
end
516567
end
@@ -1317,12 +1368,7 @@ This reusable GitHub Actions workflow provides a comprehensive Continuous Integr
13171368
| `desktop_package_name` | Name of the Desktop project module | String | Yes |
13181369
| `web_package_name` | Name of the Web project module | String | Yes |
13191370
| `ios_package_name` | Name of the iOS project module | String | Yes |
1320-
| `build_ios` | Enable iOS build | Boolean | No |
1321-
| `git_url` | Match repository URL | String | Yes |
1322-
| `git_branch` | Match repository branch | String | Yes |
1323-
| `match_type` | Match type (e.g., adhoc) | String | Yes |
1324-
| `app_identifier` | iOS app identifier | String | Yes |
1325-
| `provisioning_profile_name` | Provisioning profile name | String | Yes |
1371+
| `build_ios` | Enable iOS build | Boolean | No |
13261372

13271373
## Workflow Trigger Conditions
13281374
- Triggered on workflow call
@@ -1348,14 +1394,6 @@ jobs:
13481394
web_package_name: 'mifospay-web'
13491395
ios_package_name: 'mifospay-ios'
13501396
build_ios: true # <-- Change to 'false' if you don't want to build iOS
1351-
keychain_name: 'ci-signing.keychain'
1352-
match_type: 'adhoc'
1353-
export_method: 'ad-hoc'
1354-
app_identifier: 'org.mifos.kmp.template'
1355-
provisioning_profile_name: 'match AdHoc org.mifos.kmp.template'
1356-
secrets:
1357-
match_ssh_private_key: ${{ secrets.MATCH_SSH_PRIVATE_KEY }}
1358-
match_password: ${{ secrets.MATCH_PASSWORD }}
13591397
```
13601398

13611399
<div align="right">

0 commit comments

Comments
 (0)