Skip to content

Commit 1f1c3c9

Browse files
chore: add support for custom ci_gradle_properties_path and update README (#36)
1 parent 1c0ca86 commit 1f1c3c9

File tree

3 files changed

+40
-31
lines changed

3 files changed

+40
-31
lines changed

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

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,11 @@ on:
189189
type: string
190190
required: true
191191

192+
ci_gradle_properties_path:
193+
description: 'Path to CI-specific Gradle properties file'
194+
type: string
195+
default: '.github/ci-gradle.properties'
196+
192197
secrets:
193198
# Android-related secrets
194199
original_keystore_file:
@@ -355,6 +360,9 @@ jobs:
355360
with:
356361
fetch-depth: 0
357362

363+
- name: Copy CI gradle.properties
364+
run: mkdir -p ~/.gradle && cp "${{ inputs.ci_gradle_properties_path }}" ~/.gradle/gradle.properties
365+
358366
- name: Set latest Xcode version
359367
uses: maxim-lobanov/setup-xcode@v1
360368
with:
@@ -368,11 +376,6 @@ jobs:
368376
if: ${{ inputs.use_cocoapods }}
369377
run: ./gradlew ${{ inputs.shared_module }}:generateDummyFramework
370378

371-
- name: Install CocoaPods dependencies
372-
if: ${{ inputs.use_cocoapods }}
373-
working-directory: ${{ inputs.ios_package_name }}
374-
run: pod install
375-
376379
- name: Deploy iOS App to Firebase
377380
uses: openMF/[email protected]
378381
continue-on-error: true
@@ -401,6 +404,9 @@ jobs:
401404
- name: Checkout Repository
402405
uses: actions/checkout@v4
403406

407+
- name: Copy CI gradle.properties
408+
run: mkdir -p ~/.gradle && cp "${{ inputs.ci_gradle_properties_path }}" ~/.gradle/gradle.properties
409+
404410
- name: Set latest Xcode version
405411
uses: maxim-lobanov/setup-xcode@v1
406412
with:
@@ -414,11 +420,6 @@ jobs:
414420
if: ${{ inputs.use_cocoapods }}
415421
run: ./gradlew ${{ inputs.shared_module }}:generateDummyFramework
416422

417-
- name: Install CocoaPods dependencies
418-
if: ${{ inputs.use_cocoapods }}
419-
working-directory: ${{ inputs.ios_package_name }}
420-
run: pod install
421-
422423
- name: Deploy iOS app to TestFlight
423424
uses: openMF/[email protected]
424425
with:
@@ -442,6 +443,9 @@ jobs:
442443
- name: Checkout Repository
443444
uses: actions/checkout@v4
444445

446+
- name: Copy CI gradle.properties
447+
run: mkdir -p ~/.gradle && cp "${{ inputs.ci_gradle_properties_path }}" ~/.gradle/gradle.properties
448+
445449
- name: Set latest Xcode version
446450
uses: maxim-lobanov/setup-xcode@v1
447451
with:
@@ -455,11 +459,6 @@ jobs:
455459
if: ${{ inputs.use_cocoapods }}
456460
run: ./gradlew ${{ inputs.shared_module }}:generateDummyFramework
457461

458-
- name: Install CocoaPods dependencies
459-
if: ${{ inputs.use_cocoapods }}
460-
working-directory: ${{ inputs.ios_package_name }}
461-
run: pod install
462-
463462
- name: Deploy iOS App to App Store
464463
uses: openMF/[email protected]
465464
with:

.github/workflows/pr-check.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -219,11 +219,6 @@ jobs:
219219
if: ${{ inputs.use_cocoapods }}
220220
run: ./gradlew ${{ inputs.shared_module }}:generateDummyFramework
221221

222-
- name: Install CocoaPods dependencies
223-
if: ${{ inputs.use_cocoapods }}
224-
working-directory: ${{ inputs.ios_package_name }}
225-
run: pod install
226-
227222
- name: Build iOS App
228223
if: ${{ inputs.build_ios }}
229224
uses: openMF/[email protected]

README.md

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -331,9 +331,7 @@ platform :ios do
331331
unless ENV['CI']
332332
UI.message("🖥️ Running locally, skipping CI-specific setup.")
333333
else
334-
setup_ci(
335-
provider: "circleci"
336-
)
334+
setup_ci
337335
end
338336
end
339337

@@ -363,17 +361,28 @@ platform :ios do
363361
app_identifier = options[:app_identifier] || "com.example.9af3c1d2"
364362
provisioning_profile_name = options[:provisioning_profile_name] || "match AdHoc com.example.9af3c1d2"
365363

364+
cocoapods(
365+
podfile: "cmp-ios/Podfile",
366+
clean_install: true,
367+
repo_update: true
368+
)
369+
370+
update_code_signing_settings(
371+
use_automatic_signing: false,
372+
path: "cmp-ios/iosApp.xcodeproj",
373+
targets: "iosApp",
374+
team_id: "G432R4FZP6",
375+
code_sign_identity: "Apple Distribution",
376+
profile_name: provisioning_profile_name,
377+
bundle_identifier: "com.example.9af3c1d2"
378+
)
379+
366380
build_ios_app(
367381
scheme: "iosApp",
368-
project: "cmp-ios/iosApp.xcodeproj",
382+
workspace: cmp-ios/iosApp.xcworkspace,
369383
output_name: "iosApp.ipa",
370384
output_directory: "cmp-ios/build",
371-
export_options: {
372-
provisioningProfiles: {
373-
app_identifier => provisioning_profile_name
374-
}
375-
},
376-
xcargs: "CODE_SIGN_STYLE=Manual CODE_SIGN_IDENTITY=\"Apple Distribution\" DEVELOPMENT_TEAM=L432S2FZP5 PROVISIONING_PROFILE_SPECIFIER=\"#{provisioning_profile_name}\""
385+
skip_codesigning: "Release"
377386
)
378387
end
379388

@@ -388,6 +397,12 @@ platform :ios do
388397
options[:output_name] ||= "iosApp.ipa"
389398
options[:output_directory] ||= "cmp-ios/build"
390399

400+
cocoapods(
401+
podfile: "cmp-ios/Podfile",
402+
clean_install: true,
403+
repo_update: true
404+
)
405+
391406
build_ios_app(
392407
scheme: options[:scheme],
393408
project: options[:project_path],
@@ -858,7 +873,7 @@ concurrency:
858873
jobs:
859874
multi_platform_build_and_publish:
860875
name: Multi-Platform Build and Publish
861-
uses: openMF/mifos-x-actionhub/.github/workflows/[email protected].3
876+
uses: openMF/mifos-x-actionhub/.github/workflows/[email protected].4
862877
with:
863878
release_type: ${{ inputs.release_type }}
864879
target_branch: ${{ inputs.target_branch }}

0 commit comments

Comments
 (0)