Add Gitea Actions CI: build unsigned .ipa and publish to SideStore source
Build SwiftChat / Build .ipa and publish source (push) Successful in 4m17s
Build SwiftChat / Build .ipa and publish source (push) Successful in 4m17s
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
name: Build SwiftChat
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build .ipa and publish source
|
||||
runs-on: macos
|
||||
env:
|
||||
# Per-app: the perlis dir name, .ipa name, and metadata filename.
|
||||
# One variable so they can't drift.
|
||||
APP_NAME: SwiftChat
|
||||
# Point xcodebuild at full Xcode without sudo (sudo hangs in CI).
|
||||
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: |
|
||||
# The scheme is auto-generated from the SwiftChat target. Build with
|
||||
# no signing — SideStore signs on-device.
|
||||
xcodebuild \
|
||||
-project $APP_NAME.xcodeproj \
|
||||
-scheme $APP_NAME \
|
||||
-configuration Release \
|
||||
-sdk iphoneos \
|
||||
-destination 'generic/platform=iOS' \
|
||||
-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 ../$APP_NAME.ipa Payload
|
||||
cd ..
|
||||
ls -la $APP_NAME.ipa
|
||||
|
||||
- name: Generate app metadata
|
||||
run: |
|
||||
# Version from the built app so it can't drift from the pbxproj.
|
||||
APP_PATH=$(find build/Build/Products -name "*.app" -type d | head -1)
|
||||
VERSION=$(/usr/libexec/PlistBuddy -c "Print :CFBundleShortVersionString" "$APP_PATH/Info.plist")
|
||||
SIZE=$(stat -f%z $APP_NAME.ipa)
|
||||
DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
|
||||
cat > $APP_NAME.json <<EOF
|
||||
{
|
||||
"name": "SwiftChat",
|
||||
"bundleIdentifier": "com.3s.SwiftChat",
|
||||
"developerName": "Luis",
|
||||
"localizedDescription": "OpenAI-compatible chat client (point it at openai.bueso.eu).",
|
||||
"iconURL": "https://apps.bueso.eu/$APP_NAME/icon.png",
|
||||
"downloadURL": "https://apps.bueso.eu/$APP_NAME/$APP_NAME.ipa",
|
||||
"version": "$VERSION",
|
||||
"versionDate": "$DATE",
|
||||
"size": $SIZE,
|
||||
"permissions": []
|
||||
}
|
||||
EOF
|
||||
cat $APP_NAME.json
|
||||
|
||||
- name: Upload to source host (perlis)
|
||||
run: |
|
||||
# ssh/scp use the PERLIS_SSH_USER/HOST secrets (repo-scoped, set on
|
||||
# this repo). Upload .ipa + per-app metadata + icon to perlis; the
|
||||
# apps.bueso.eu aggregator folds them into the root source.json.
|
||||
ssh -o StrictHostKeyChecking=no \
|
||||
"${{ secrets.PERLIS_SSH_USER }}@${{ secrets.PERLIS_SSH_HOST }}" \
|
||||
"mkdir -p /mnt/appdata/ios-apps/$APP_NAME"
|
||||
scp -o StrictHostKeyChecking=no \
|
||||
$APP_NAME.ipa $APP_NAME.json icon.png \
|
||||
"${{ secrets.PERLIS_SSH_USER }}@${{ secrets.PERLIS_SSH_HOST }}:/mnt/appdata/ios-apps/$APP_NAME/"
|
||||
Reference in New Issue
Block a user