From ce43d6c62f77d6ad13019d6db93de6de41e87dd4 Mon Sep 17 00:00:00 2001 From: Blazej SLEBODA <5544365+adobels@users.noreply.github.com> Date: Sat, 4 May 2024 08:55:03 +0200 Subject: [PATCH] Add section markers in sh script and move code signing into it --- .github/workflows/dev.yml | 6 ------ buildxcf.sh | 19 +++++++++++++++---- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 12d4b13..2a3dc39 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -23,12 +23,6 @@ jobs: uses: actions/checkout@v4.1.4 - 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: diff --git a/buildxcf.sh b/buildxcf.sh index 30b0367..50aaaa4 100755 --- a/buildxcf.sh +++ b/buildxcf.sh @@ -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::"