Add Gitea CI workflow with IPA distribution
All checks were successful
CI / build-and-deploy (push) Successful in 16s
All checks were successful
CI / build-and-deploy (push) Successful in 16s
On every push to swift/master: compile-checks against the simulator (no signing required) then builds a development IPA and deploys it to the shared OTA server at krishnas-mac-studio.tail37d544.ts.net:8443. Modelled on 1ai's ci.yaml — runs on the local macos act runner so the keychain is live and automatic signing works without any cert setup. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
50
.gitea/workflows/ci.yaml
Normal file
50
.gitea/workflows/ci.yaml
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- swift
|
||||||
|
- 'feat/**'
|
||||||
|
- 'feature/**'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-deploy:
|
||||||
|
runs-on: macos
|
||||||
|
env:
|
||||||
|
DEVELOPER_DIR: /Applications/Xcode-26.3.app/Contents/Developer
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Generate Xcode project
|
||||||
|
run: xcodegen generate
|
||||||
|
|
||||||
|
- name: Build (simulator, compile check)
|
||||||
|
run: |
|
||||||
|
SIM_ID=$(xcrun simctl list devices available -j | python3 -c "
|
||||||
|
import json,sys
|
||||||
|
for rt,devs in json.load(sys.stdin)['devices'].items():
|
||||||
|
if 'iOS' in rt:
|
||||||
|
for d in devs:
|
||||||
|
if 'iPhone' in d['name'] and d['isAvailable']:
|
||||||
|
print(d['udid']); sys.exit()
|
||||||
|
" 2>/dev/null)
|
||||||
|
echo "Using simulator: $SIM_ID"
|
||||||
|
xcodebuild build \
|
||||||
|
-project Marks.xcodeproj \
|
||||||
|
-scheme Marks \
|
||||||
|
-destination "platform=iOS Simulator,id=$SIM_ID" \
|
||||||
|
-configuration Debug \
|
||||||
|
CODE_SIGNING_ALLOWED=NO \
|
||||||
|
CODE_SIGN_IDENTITY="" \
|
||||||
|
CODE_SIGNING_REQUIRED=NO \
|
||||||
|
DEVELOPMENT_TEAM=""
|
||||||
|
|
||||||
|
- name: Build IPA and deploy to OTA server
|
||||||
|
run: ./scripts/ipa-server/build-and-deploy.sh
|
||||||
|
continue-on-error: true
|
||||||
@@ -34,9 +34,13 @@ elif [ -n "$1" ] && [ "$1" != "$CURRENT_BRANCH" ]; then
|
|||||||
COMMIT=$(git rev-parse --short HEAD)
|
COMMIT=$(git rev-parse --short HEAD)
|
||||||
echo "📌 Building commit: $COMMIT on $1"
|
echo "📌 Building commit: $COMMIT on $1"
|
||||||
else
|
else
|
||||||
|
COMMIT=$(git rev-parse --short HEAD)
|
||||||
|
if git ls-remote --exit-code origin "$CURRENT_BRANCH" &>/dev/null; then
|
||||||
echo "⬇️ Pulling latest $CURRENT_BRANCH..."
|
echo "⬇️ Pulling latest $CURRENT_BRANCH..."
|
||||||
git pull origin "$CURRENT_BRANCH"
|
git pull origin "$CURRENT_BRANCH"
|
||||||
COMMIT=$(git rev-parse --short HEAD)
|
else
|
||||||
|
echo "⚠️ No remote for $CURRENT_BRANCH — building local HEAD"
|
||||||
|
fi
|
||||||
echo "📌 Building commit: $COMMIT on $CURRENT_BRANCH"
|
echo "📌 Building commit: $COMMIT on $CURRENT_BRANCH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user