Files
iOS-hello_world/.gitea/workflows/build.yml
T
2026-08-09 15:13:55 +00:00

90 lines
3.0 KiB
YAML

name: Build iOS App
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
name: Build .ipa and publish source
runs-on: macos
env:
# Point xcodebuild at full Xcode without sudo (sudo hangs in CI).
# DEVELOPER_DIR overrides the active developer directory for all steps.
DEVELOPER_DIR: /Applications/Xcode.app/Contents/Developer
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Select Xcode
run: |
xcodebuild -version
- name: Build unsigned .ipa
run: |
# Build the app bundle (no signing — SideStore signs on-device)
xcodebuild \
-project iOS-hello_world.xcodeproj \
-scheme iOS-hello_world \
-configuration Release \
-sdk iphoneos \
-derivedDataPath build \
CODE_SIGNING_ALLOWED=NO \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGN_IDENTITY="" \
build
# Locate the .app bundle
APP_PATH=$(find build/Build/Products -name "*.app" -type d | head -1)
echo "App bundle: $APP_PATH"
# Package into an .ipa (Payload/App.app structure)
mkdir -p dist/Payload
cp -R "$APP_PATH" dist/Payload/
cd dist
zip -r ../iOS-hello_world.ipa Payload
cd ..
ls -la iOS-hello_world.ipa
- name: Generate source.json
run: |
VERSION="1.0"
SIZE=$(stat -f%z iOS-hello_world.ipa)
DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
cat > source.json <<EOF
{
"name": "Hello World",
"identifier": "com.example.helloworld.source",
"sourceURL": "https://apps.bueso.eu/ios-hello_world/source.json",
"apps": [
{
"name": "Hello World",
"bundleIdentifier": "com.example.helloworld",
"developerName": "Luis",
"localizedDescription": "Hello World iOS app built via Gitea Actions.",
"iconURL": "https://apps.bueso.eu/ios-hello_world/icon.png",
"downloadURL": "https://apps.bueso.eu/ios-hello_world/iOS-hello_world.ipa",
"version": "$VERSION",
"versionDate": "$DATE",
"size": $SIZE,
"permissions": []
}
]
}
EOF
cat source.json
- name: Upload to source host (perlis)
run: |
# Upload .ipa + source.json to perlis via SSH.
# PERLIS_SSH_HOST is the Tailscale MagicDNS name (perlis.bueso.loc),
# reachable from the iMac runner over the Tailscale mesh.
ssh -o StrictHostKeyChecking=no \
"${{ secrets.PERLIS_SSH_USER }}@${{ secrets.PERLIS_SSH_HOST }}" \
"mkdir -p /mnt/appdata/ios-apps/ios-hello_world"
scp -o StrictHostKeyChecking=no \
iOS-hello_world.ipa source.json \
"${{ secrets.PERLIS_SSH_USER }}@${{ secrets.PERLIS_SSH_HOST }}:/mnt/appdata/ios-apps/ios-hello_world/"