Skip to content

Commit

Permalink
Add section markers in sh script and move code signing into it
Browse files Browse the repository at this point in the history
  • Loading branch information
Adobels committed May 4, 2024
1 parent d4dec20 commit ce43d6c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ jobs:
uses: actions/[email protected]
- name: Build XCFramework
run: ./buildxcf.sh
- name: Sign XCFramework
run: |
codesign -s "iPhone Distribution: Blazej SLEBODA (43VBDTY4E3)" \
--force \
--deep \
-- $XCFRAMEWORK_OUTPUT_DIR/$XCFRAMEWORK_NAME_WITH_EXTENSION
- name: Upload XCFramework as Artifact
uses: actions/upload-artifact@v4
with:
Expand Down
19 changes: 15 additions & 4 deletions buildxcf.sh
Original file line number Diff line number Diff line change
@@ -1,27 +1,38 @@
#!/bin/bash

# Clean previous builds
echo "::group::Clean previous builds"
rm -rf $XCFRAMEWORK_OUTPUT_DIR
mkdir $XCFRAMEWORK_OUTPUT_DIR
echo "::endgroup::"

# Build for iOS
echo "::group::Build for iOS"
xcodebuild archive \
-scheme $XCFRAMEWORK_NAME \
-destination 'generic/platform=iOS' \
-archivePath "$XCFRAMEWORK_OUTPUT_DIR/ios" \
SKIP_INSTALL=NO \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES
echo "::endgroup::"

# Build for iOS Simulator
echo "::group::Build for iOS Simulator"
xcodebuild archive \
-scheme $XCFRAMEWORK_NAME \
-destination 'generic/platform=iOS Simulator' \
-archivePath "$XCFRAMEWORK_OUTPUT_DIR/ios_simulator" \
SKIP_INSTALL=NO \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES
echo "::endgroup::"

# Create XCFramework
echo "::group::Create XCFramework"
xcodebuild -create-xcframework \
-framework "$XCFRAMEWORK_OUTPUT_DIR/ios.xcarchive/Products/Library/Frameworks/$XCFRAMEWORK_NAME.framework" \
-framework "$XCFRAMEWORK_OUTPUT_DIR/ios_simulator.xcarchive/Products/Library/Frameworks/$XCFRAMEWORK_NAME.framework" \
-output "$XCFRAMEWORK_OUTPUT_DIR/$XCFRAMEWORK_NAME.xcframework"
echo "::endgroup::"

echo "::group::Sign XCFramework"
codesign -s "iPhone Distribution: Blazej SLEBODA (43VBDTY4E3)" \
--force \
--deep \
-- $XCFRAMEWORK_OUTPUT_DIR/$XCFRAMEWORK_NAME_WITH_EXTENSION
echo "::endgroup::"

0 comments on commit ce43d6c

Please sign in to comment.