mirror of
https://github.com/morgan9e/SensorReader
synced 2026-04-14 00:14:33 +09:00
70 lines
1.7 KiB
YAML
70 lines
1.7 KiB
YAML
name: Build iOS App
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, master, develop ]
|
|
pull_request:
|
|
branches: [ main, master, develop ]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
name: Build iOS App
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
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: Show available SDKs
|
|
run: xcodebuild -showsdks
|
|
|
|
- name: Build iOS App
|
|
run: |
|
|
xcodebuild clean build \
|
|
-project EnvSensorReader.xcodeproj \
|
|
-scheme EnvSensorReader \
|
|
-sdk iphoneos \
|
|
-configuration Release \
|
|
CODE_SIGN_IDENTITY="" \
|
|
CODE_SIGNING_REQUIRED=NO \
|
|
CODE_SIGNING_ALLOWED=NO \
|
|
ONLY_ACTIVE_ARCH=NO
|
|
|
|
- name: Build for iOS Simulator
|
|
run: |
|
|
xcodebuild clean build \
|
|
-project EnvSensorReader.xcodeproj \
|
|
-scheme EnvSensorReader \
|
|
-sdk iphonesimulator \
|
|
-configuration Release \
|
|
CODE_SIGN_IDENTITY="" \
|
|
CODE_SIGNING_REQUIRED=NO \
|
|
CODE_SIGNING_ALLOWED=NO \
|
|
ONLY_ACTIVE_ARCH=NO
|
|
|
|
- name: Archive build products
|
|
if: success()
|
|
run: |
|
|
mkdir -p artifacts
|
|
if [ -d "build/Release-iphoneos" ]; then
|
|
cp -R build/Release-iphoneos artifacts/ || true
|
|
fi
|
|
if [ -d "build/Release-iphonesimulator" ]; then
|
|
cp -R build/Release-iphonesimulator artifacts/ || true
|
|
fi
|
|
|
|
- name: Upload build artifacts
|
|
if: success()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ios-build
|
|
path: artifacts/
|
|
retention-days: 30
|