Skip to content

Commit

Permalink
create xcframework
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasromanomr committed Nov 29, 2024
1 parent 9b5da6b commit a63f2de
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
build:
name: Build XCFramework for Multiple Platforms
name: Build XCFramework
runs-on: macos-latest
strategy:
matrix:
Expand Down Expand Up @@ -46,10 +46,17 @@ jobs:
xcodebuild archive \
-scheme "${{ matrix.build-config.scheme }}" \
-destination "${{ matrix.build-config.destination }}" \
-configuration Release \
-sdk "${{ matrix.build-config.sdk }}" \
-archivePath "${{ matrix.build-config.archive_path }}/SkeletonView.xcarchive" \
SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES
- name: Upload archive as artifact
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.build-config.sdk }}-build
path: ${{ matrix.build-config.archive_path }}

create-xcframework:
name: Create XCFramework
needs: build
Expand All @@ -59,30 +66,25 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Download build artifacts
uses: actions/download-artifact@v4
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: build-artifacts
path: build/

- name: Verify downloaded artifacts
run: ls -R build/

- name: Create XCFramework
run: |
xcodebuild -create-xcframework \
-framework build/Release-iphoneos/SkeletonView.xcarchive/Products/Library/Frameworks/SkeletonView.framework \
-framework build/Release-iphonesimulator/SkeletonView.xcarchive/Products/Library/Frameworks/SkeletonView.framework \
-framework build/Release-appletvos/SkeletonView.xcarchive/Products/Library/Frameworks/SkeletonView.framework \
-framework build/Release-appletvsimulator/SkeletonView.xcarchive/Products/Library/Frameworks/SkeletonView.framework \
-framework build/iphoneos-build/SkeletonView.xcarchive/Products/Library/Frameworks/SkeletonView.framework \
-framework build/iphonesimulator-build/SkeletonView.xcarchive/Products/Library/Frameworks/SkeletonView.framework \
-framework build/appletvos-build/SkeletonView.xcarchive/Products/Library/Frameworks/SkeletonView.framework \
-framework build/appletvsimulator-build/SkeletonView.xcarchive/Products/Library/Frameworks/SkeletonView.framework \
-output build/XCFramework/SkeletonView.xcframework
- name: Verify XCFramework
run: |
if [ -d "build/XCFramework/SkeletonView.xcframework" ]; then
echo "XCFramework generated successfully."
else
echo "Failed to generate XCFramework." && exit 1
fi
- name: Upload XCFramework
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v3
with:
name: SkeletonView-XCFramework
path: build/XCFramework/SkeletonView.xcframework
Expand Down

0 comments on commit a63f2de

Please sign in to comment.