Update Build.yml #9
Workflow file for this run
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 | |
on: push | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Cancel Previous Runs | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- name: Set up Xcode Version | |
uses: actions/setup-xcode@v2 | |
with: | |
xcode-version: '15.0' | |
- name: Running Xcode version Is? | |
run: /usr/bin/xcodebuild -version | |
- name: Install the Apple Certificate and Provisioning Profile | |
run: | | |
chmod +x install_dist_certs.sh && ./install_dist_certs.sh | |
chmod +x install_dist_profile.sh && ./install_dist_profile.sh | |
- name: Cache CocoaPods | |
uses: actions/cache@v2 | |
with: | |
path: | | |
Pods | |
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} | |
restore-keys: | | |
${{ runner.os }}-pods- | |
- name: Install CocoaPods | |
run: | | |
if [ -f "Podfile.lock" ] && [ -f "${{ runner.workspace }}/Podfile.lock" ] && cmp -s Podfile.lock "${{ runner.workspace }}/Podfile.lock"; then | |
echo "Podfile.lock unchanged. Skipping pod installs." | |
else | |
gem install cocoapods | |
pod install --repo-update | |
fi | |
- name: Run Lint | |
run: | | |
Pods/SwiftLint/swiftlint Splito | |
- name: Build Cleanup | |
run: | | |
xcodebuild clean -workspace Splito.xcworkspace -scheme Splito | xcpretty | |
- name: Archive Project | |
run: | | |
ARCHIVE_PATH="$HOME/Library/Developer/Xcode/Archives/Splito/${CI_COMMIT_SHA}/${CI_JOB_ID}.xcarchive" | |
xcodebuild -workspace Splito.xcworkspace -scheme "Splito" clean archive -sdk iphoneos -destination 'platform=iOS Simulator,name=iPhone 13' -archivePath $ARCHIVE_PATH | xcpretty --color | |
rm -rf $ARCHIVE_PATH |