Use single APP_NAME variable so dir and file names can't drift
Build iOS App / Build .ipa and publish source (push) Successful in 13s

This commit is contained in:
Hermes
2026-08-09 16:19:36 +00:00
parent 46bc2ac6ac
commit 2436ba0b33
+15 -12
View File
@@ -11,6 +11,9 @@ jobs:
name: Build .ipa and publish source name: Build .ipa and publish source
runs-on: macos runs-on: macos
env: env:
# Per-app: change APP_NAME for each app repo. Used everywhere so the
# perlis dir name and file names always match (no hardcoded drift).
APP_NAME: iOS-hello_world
# Point xcodebuild at full Xcode without sudo (sudo hangs in CI). # Point xcodebuild at full Xcode without sudo (sudo hangs in CI).
# DEVELOPER_DIR overrides the active developer directory for all steps. # DEVELOPER_DIR overrides the active developer directory for all steps.
DEVELOPER_DIR: /Applications/Xcode.app/Contents/Developer DEVELOPER_DIR: /Applications/Xcode.app/Contents/Developer
@@ -26,8 +29,8 @@ jobs:
run: | run: |
# Build the app bundle (no signing — SideStore signs on-device) # Build the app bundle (no signing — SideStore signs on-device)
xcodebuild \ xcodebuild \
-project iOS-hello_world.xcodeproj \ -project $APP_NAME.xcodeproj \
-scheme iOS-hello_world \ -scheme $APP_NAME \
-configuration Release \ -configuration Release \
-sdk iphoneos \ -sdk iphoneos \
-destination 'generic/platform=iOS' \ -destination 'generic/platform=iOS' \
@@ -45,32 +48,32 @@ jobs:
mkdir -p dist/Payload mkdir -p dist/Payload
cp -R "$APP_PATH" dist/Payload/ cp -R "$APP_PATH" dist/Payload/
cd dist cd dist
zip -r ../iOS-hello_world.ipa Payload zip -r ../$APP_NAME.ipa Payload
cd .. cd ..
ls -la iOS-hello_world.ipa ls -la $APP_NAME.ipa
- name: Generate app metadata - name: Generate app metadata
run: | run: |
VERSION="1.0" VERSION="1.0"
SIZE=$(stat -f%z iOS-hello_world.ipa) SIZE=$(stat -f%z $APP_NAME.ipa)
DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
# Per-app metadata file. The perlis aggregator folds this into the # Per-app metadata file. The perlis aggregator folds this into the
# root source.json at https://apps.bueso.eu/source.json. # root source.json at https://apps.bueso.eu/source.json.
cat > iOS-hello_world.json <<EOF cat > $APP_NAME.json <<EOF
{ {
"name": "Hello World", "name": "Hello World",
"bundleIdentifier": "com.example.helloworld", "bundleIdentifier": "com.example.helloworld",
"developerName": "Luis", "developerName": "Luis",
"localizedDescription": "Hello World iOS app built via Gitea Actions.", "localizedDescription": "Hello World iOS app built via Gitea Actions.",
"iconURL": "https://apps.bueso.eu/ios-hello_world/icon.png", "iconURL": "https://apps.bueso.eu/$APP_NAME/icon.png",
"downloadURL": "https://apps.bueso.eu/ios-hello_world/iOS-hello_world.ipa", "downloadURL": "https://apps.bueso.eu/$APP_NAME/$APP_NAME.ipa",
"version": "$VERSION", "version": "$VERSION",
"versionDate": "$DATE", "versionDate": "$DATE",
"size": $SIZE, "size": $SIZE,
"permissions": [] "permissions": []
} }
EOF EOF
cat iOS-hello_world.json cat $APP_NAME.json
- name: Upload to source host (perlis) - name: Upload to source host (perlis)
run: | run: |
@@ -79,7 +82,7 @@ jobs:
# reachable from the iMac runner over the Tailscale mesh. # reachable from the iMac runner over the Tailscale mesh.
ssh -o StrictHostKeyChecking=no \ ssh -o StrictHostKeyChecking=no \
"${{ secrets.PERLIS_SSH_USER }}@${{ secrets.PERLIS_SSH_HOST }}" \ "${{ secrets.PERLIS_SSH_USER }}@${{ secrets.PERLIS_SSH_HOST }}" \
"mkdir -p /mnt/appdata/ios-apps/ios-hello_world" "mkdir -p /mnt/appdata/ios-apps/$APP_NAME"
scp -o StrictHostKeyChecking=no \ scp -o StrictHostKeyChecking=no \
iOS-hello_world.ipa iOS-hello_world.json \ $APP_NAME.ipa $APP_NAME.json \
"${{ secrets.PERLIS_SSH_USER }}@${{ secrets.PERLIS_SSH_HOST }}:/mnt/appdata/ios-apps/ios-hello_world/" "${{ secrets.PERLIS_SSH_USER }}@${{ secrets.PERLIS_SSH_HOST }}:/mnt/appdata/ios-apps/$APP_NAME/"