Skip to content

Commit

Permalink
ci(GiniHealthSDK): WIP commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Selivonchyk committed Oct 8, 2024
1 parent add3d8a commit 9b832ff
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 63 deletions.
122 changes: 60 additions & 62 deletions .github/workflows/health-sdk.build.xcframeworks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,73 +76,71 @@ jobs:
-destination generic/platform=iOS \
-archivePath "iphoneosPinning.xcarchive" SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES
# - name: Generate XCFrameworks
# run: |
# xcodebuild -create-xcframework \
# -framework iphoneosPinning.xcarchive/Products/Library/Frameworks/GiniHealthAPILibrary.framework \
# -framework iphonesimulatorPinning.xcarchive/Products/Library/Frameworks/GiniHealthAPILibrary.framework \
# -output GiniHealthAPILibrary.xcframework &&\
# \
# xcodebuild -create-xcframework \
# -framework iphoneosPinning.xcarchive/Products/Library/Frameworks/GiniHealthSDK.framework \
# -framework iphonesimulatorPinning.xcarchive/Products/Library/Frameworks/GiniHealthSDK.framework \
# -output GiniHealthSDK.xcframework &&\
# \
# xcodebuild -create-xcframework \
# -framework iphoneosPinning.xcarchive/Products/Library/Frameworks/GiniHealthAPILibraryPinning.framework \
# -framework iphonesimulatorPinning.xcarchive/Products/Library/Frameworks/GiniHealthAPILibraryPinning.framework \
# -output GiniHealthAPILibraryPinning.xcframework && \
# \
# xcodebuild -create-xcframework \
# -framework iphoneosPinning.xcarchive/Products/Library/Frameworks/GiniHealthSDKPinning.framework \
# -framework iphonesimulatorPinning.xcarchive/Products/Library/Frameworks/GiniHealthSDKPinning.framework \
# -output GiniHealthSDKPinning.xcframework
#
# - name: Sign the XCFrameworks
# env:
# BUILD_CERTIFICATE_BASE64: ${{ secrets.GINI_DISTRIBUTION_CERTIFICATE }}
# P12_PASSWORD: ${{ secrets.GINI_DISTRIBUTION_CERTIFICATE_SECRET }}
# BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.GINI_HEALTH_SDK_EXAMPLE_APP_ADHOC_DISTRIBUTION_PROVISION_PROFILE }}
# KEYCHAIN_PASSWORD: ${{ secrets.GINI_DISTRIBUTION_CERTIFICATE_SECRET }}
# run: |
# # Setup distribution certificate
# CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
# PP_PATH1=$RUNNER_TEMP/build_pp1.mobileprovision
# PP_PATH2=$RUNNER_TEMP/build_pp2.mobileprovision
- name: Generate XCFrameworks
run: |
xcodebuild -create-xcframework \
-framework iphoneosPinning.xcarchive/Products/Library/Frameworks/GiniHealthAPILibrary.framework \
-framework iphonesimulatorPinning.xcarchive/Products/Library/Frameworks/GiniHealthAPILibrary.framework \
-output GiniHealthAPILibrary.xcframework &&\
\
xcodebuild -create-xcframework \
-framework iphoneosPinning.xcarchive/Products/Library/Frameworks/GiniHealthSDK.framework \
-framework iphonesimulatorPinning.xcarchive/Products/Library/Frameworks/GiniHealthSDK.framework \
-output GiniHealthSDK.xcframework &&\
\
xcodebuild -create-xcframework \
-framework iphoneosPinning.xcarchive/Products/Library/Frameworks/GiniHealthAPILibraryPinning.framework \
-framework iphonesimulatorPinning.xcarchive/Products/Library/Frameworks/GiniHealthAPILibraryPinning.framework \
-output GiniHealthAPILibraryPinning.xcframework && \
\
xcodebuild -create-xcframework \
-framework iphoneosPinning.xcarchive/Products/Library/Frameworks/GiniHealthSDKPinning.framework \
-framework iphonesimulatorPinning.xcarchive/Products/Library/Frameworks/GiniHealthSDKPinning.framework \
-output GiniHealthSDKPinning.xcframework
- name: Sign the XCFrameworks
env:
BUILD_CERTIFICATE_BASE64: ${{ secrets.GINI_DISTRIBUTION_CERTIFICATE }}
P12_PASSWORD: ${{ secrets.GINI_DISTRIBUTION_CERTIFICATE_SECRET }}
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.GINI_HEALTH_SDK_EXAMPLE_APP_ADHOC_DISTRIBUTION_PROVISION_PROFILE }}
KEYCHAIN_PASSWORD: ${{ secrets.GINI_DISTRIBUTION_CERTIFICATE_SECRET }}
run: |
# Setup distribution certificate
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
PP_PATH1=$RUNNER_TEMP/build_pp1.mobileprovision
# KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
# # import certificate and provisioning profile from secrets
# echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH
# echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode -o $PP_PATH1
# import certificate and provisioning profile from secrets
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH
echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode -o $PP_PATH1
# # create temporary keychain
# security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
# security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
# security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
# create temporary keychain
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
# # import certificate to keychain
# security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
# security list-keychain -d user -s $KEYCHAIN_PATH
# import certificate to keychain
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security list-keychain -d user -s $KEYCHAIN_PATH
# # apply provisioning profile
# mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
# cp $PP_PATH1 ~/Library/MobileDevice/Provisioning\ Profiles
# cp $PP_PATH2 ~/Library/MobileDevice/Provisioning\ Profiles
# apply provisioning profile
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
cp $PP_PATH1 ~/Library/MobileDevice/Provisioning\ Profiles
# # sign xcframeworks
# codesign --timestamp -v --sign "Apple Distribution: Gini GmbH (JA825X8F7Z)" GiniHealthBankAPILibrary.xcframework && \
# codesign --timestamp -v --sign "Apple Distribution: Gini GmbH (JA825X8F7Z)" GiniHealthSDK.xcframework && \
# codesign --timestamp -v --sign "Apple Distribution: Gini GmbH (JA825X8F7Z)" GiniHealthAPILibraryPinning.xcframework && \
# codesign --timestamp -v --sign "Apple Distribution: Gini GmbH (JA825X8F7Z)" GiniHealthSDKPinning.xcframework
# sign xcframeworks
codesign --timestamp -v --sign "Apple Distribution: Gini GmbH (JA825X8F7Z)" GiniHealthAPILibrary.xcframework && \
codesign --timestamp -v --sign "Apple Distribution: Gini GmbH (JA825X8F7Z)" GiniHealthSDK.xcframework && \
codesign --timestamp -v --sign "Apple Distribution: Gini GmbH (JA825X8F7Z)" GiniHealthAPILibraryPinning.xcframework && \
codesign --timestamp -v --sign "Apple Distribution: Gini GmbH (JA825X8F7Z)" GiniHealthSDKPinning.xcframework
# - name: archive frameworks GiniHealthAPILibrary
# uses: actions/upload-artifact@v4
# with:
# name: GiniHealthSDKFramework
# path: |
# GiniHealthAPILibrary.xcframework
# GiniHealthSDK.xcframework
# GiniHealthSDKPinning.xcframework
# GiniHealthAPILibraryPinning.xcframework
- name: archive frameworks GiniHealthAPILibrary
uses: actions/upload-artifact@v4
with:
name: GiniHealthSDKFramework
path: |
GiniHealthAPILibrary.xcframework
GiniHealthSDK.xcframework
GiniHealthSDKPinning.xcframework
GiniHealthAPILibraryPinning.xcframework
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import UIKit

*/
public func giniHealthBundle() -> Bundle {
Bundle.module
Bundle.resource
}

/**
Expand Down

0 comments on commit 9b832ff

Please sign in to comment.