Fix the command #59
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-13 | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Cancel Previous Runs | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- name: Set Xcode Version | |
run: | | |
sudo xcode-select -switch /Applications/Xcode_15.2.app | |
- name: Display Xcode Version | |
run: /usr/bin/xcodebuild -version | |
- name: Cache Derived Data | |
uses: actions/cache@v2 | |
with: | |
path: | | |
DerivedData | |
key: ${{ runner.os }}-derived-data-${{ hashFiles('**/Podfile.lock') }} | |
restore-keys: ${{ runner.os }}-derived-data- | |
- name: Install Apple Certificate and Provisioning Profile | |
env: | |
BUILD_KEYCHAIN: ${{ secrets.BUILD_KEYCHAIN }} | |
BUILD_KEYCHAIN_PASSWORD: ${{ secrets.BUILD_KEYCHAIN_PASSWORD }} | |
BUILD_CERTIFICATE_KEY: ${{ secrets.BUILD_CERTIFICATE_KEY }} | |
BUILD_CERTIFICATE_PASSWORD: ${{ secrets.BUILD_CERTIFICATE_PASSWORD }} | |
BUILD_PROVISION_PROFILE: ${{ secrets.BUILD_PROVISION_PROFILE }} | |
BUILD_PROVISION_UUID: ${{ secrets.BUILD_PROVISION_UUID }} | |
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 SwiftLint if Needed | |
run: | | |
if git diff --name-only ${{ github.sha }} | grep -q '\.swift$'; then | |
Pods/SwiftLint/swiftlint Splito | |
else | |
echo "No Swift files changed. Skipping SwiftLint." | |
fi | |
- 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" -archivePath $ARCHIVE_PATH -sdk iphoneos -destination generic/platform=iOS clean archive | |
rm -rf $ARCHIVE_PATH |