-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): Add GitHub action for xcframework (#5415)
* feat(ci): Add GitHub action for xcframework * fix(ci): Remove duplicate CI commands from publish-ios workflow * feat(ci): create GitHub action that builds, zips, and attachs xcframework to latest release * fix(ci): Add 'BUILD_LIBRARY_FOR_DISTRIBUTION' flag
- Loading branch information
1 parent
9420f08
commit f9051d0
Showing
3 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Attach .xcframework file to release | ||
|
||
on: workflow_dispatch | ||
jobs: | ||
publish-xcframework: | ||
runs-on: macos-11 | ||
timeout-minutes: 30 | ||
steps: | ||
- run: sudo xcode-select --switch /Applications/Xcode_12.5.app | ||
- run: brew install ghr | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14.x | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: native-publish | ||
- name: Build Capacitor.xcframework | ||
run: carthage build --no-skip-current --use-xcframeworks | ||
- name: Build CapacitorCordova.xcframework | ||
run: | | ||
cd ios/CapacitorCordova | ||
xcodebuild archive -scheme Cordova -sdk iphonesimulator SKIP_INSTALL=NO -archivePath Build/iOS-Simulator | ||
xcodebuild archive -scheme Cordova -sdk iphoneos SKIP_INSTALL=NO -archivePath Build/iOS | ||
xcodebuild -create-xcframework -framework Build/iOS.xcarchive/Products/Library/Frameworks/Cordova.framework -framework Build/iOS-Simulator.xcarchive/Products/Library/Frameworks/Cordova.framework -output CapacitorCordova.xcframework | ||
cd ../.. | ||
- name: Create Capacitor.xcframework.zip | ||
run: | | ||
mkdir Carthage/Build/CapacitorCordova.xcframework | ||
mv ios/CapacitorCordova/CapacitorCordova.xcframework/* Carthage/Build/CapacitorCordova.xcframework | ||
zip -r Capacitor.xcframework.zip Carthage/Build | ||
rm -rf ios/CapacitorCordova/CapacitorCordova.xcframework | ||
- name: Attach ZIP to latest release | ||
run: ghr -replace $(git describe -tags --abbrev=0) Capacitor.xcframework.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters