Update compile.yml #3
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
name: Build Cork | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
jobs: | ||
build: | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- name: Set up Xcode environment if needed | ||
run : sudo xcode-select --switch /Applications/Xcode.app # Adjust if needed | ||
- name : Install dependencies (if any) | ||
run : | | ||
brew install cocoapods # If you have CocoaPods dependencies | ||
- name : Delete corrupted Package.resolved file | ||
run : rm ./Cork.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved | ||
- name : Resolve package dependencies | ||
run : | ||
xcrun xcodebuild \ | ||
-resolvePackages | xcpretty | ||
# Build project | ||
#-name resolve dependenices and build project | ||
run : | ||
xcrun xcoddebuild \-project Cork.xcoddeproj \clean archive | xcpretty | ||
## Upload built app as artifact for download. | ||
uses;actions/upload-artifact @ v2 with:path:.github/corkapp.zip | ||
This setup will delete corrupted 'package resolved'file, resolve package dependecies,then proceed building uploading app |