Skip to content

Merge: Add GitHub Actions secrets docs to ios26 branch #4

Merge: Add GitHub Actions secrets docs to ios26 branch

Merge: Add GitHub Actions secrets docs to ios26 branch #4

Workflow file for this run

name: Build and Test
on:
push:
branches: [ main, ios26-alarmkit ]
pull_request:
branches: [ main ]
jobs:
build:
name: Build and Test
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Select Xcode Version
run: sudo xcode-select -s /Applications/Xcode_15.2.app/Contents/Developer
- name: Show Xcode Version
run: xcodebuild -version
- name: Cache DerivedData
uses: actions/cache@v3
with:
path: ~/Library/Developer/Xcode/DerivedData
key: ${{ runner.os }}-derived-data-${{ hashFiles('**/*.swift') }}
restore-keys: |
${{ runner.os }}-derived-data-
- name: Install xcodegen
run: brew install xcodegen
- name: Generate Xcode Project
run: xcodegen generate
- name: Add API Key Placeholder
run: |
cp Config/Secrets.template.xcconfig Config/Secrets.xcconfig
echo "LTA_API_KEY = ${{ secrets.LTA_API_KEY || 'DEMO_KEY' }}" > Config/Secrets.xcconfig
- name: Build
run: |
xcodebuild clean build \
-project BusAlarm.xcodeproj \
-scheme BusAlarm \
-destination 'platform=iOS Simulator,name=iPhone 15 Pro,OS=17.2' \
CODE_SIGN_IDENTITY="" \
CODE_SIGNING_REQUIRED=NO
- name: Upload Build Logs
if: failure()
uses: actions/upload-artifact@v3
with:
name: build-logs
path: |
~/Library/Developer/Xcode/DerivedData/*/Logs/