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
Build iOS App / Build .ipa and publish source (push) Successful in 13s
This commit is contained in:
+15
-12
@@ -11,6 +11,9 @@ jobs:
|
||||
name: Build .ipa and publish source
|
||||
runs-on: macos
|
||||
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).
|
||||
# DEVELOPER_DIR overrides the active developer directory for all steps.
|
||||
DEVELOPER_DIR: /Applications/Xcode.app/Contents/Developer
|
||||
@@ -26,8 +29,8 @@ jobs:
|
||||
run: |
|
||||
# Build the app bundle (no signing — SideStore signs on-device)
|
||||
xcodebuild \
|
||||
-project iOS-hello_world.xcodeproj \
|
||||
-scheme iOS-hello_world \
|
||||
-project $APP_NAME.xcodeproj \
|
||||
-scheme $APP_NAME \
|
||||
-configuration Release \
|
||||
-sdk iphoneos \
|
||||
-destination 'generic/platform=iOS' \
|
||||
@@ -45,32 +48,32 @@ jobs:
|
||||
mkdir -p dist/Payload
|
||||
cp -R "$APP_PATH" dist/Payload/
|
||||
cd dist
|
||||
zip -r ../iOS-hello_world.ipa Payload
|
||||
zip -r ../$APP_NAME.ipa Payload
|
||||
cd ..
|
||||
ls -la iOS-hello_world.ipa
|
||||
ls -la $APP_NAME.ipa
|
||||
|
||||
- name: Generate app metadata
|
||||
run: |
|
||||
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")
|
||||
# Per-app metadata file. The perlis aggregator folds this into the
|
||||
# root source.json at https://apps.bueso.eu/source.json.
|
||||
cat > iOS-hello_world.json <<EOF
|
||||
cat > $APP_NAME.json <<EOF
|
||||
{
|
||||
"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",
|
||||
"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 iOS-hello_world.json
|
||||
cat $APP_NAME.json
|
||||
|
||||
- name: Upload to source host (perlis)
|
||||
run: |
|
||||
@@ -79,7 +82,7 @@ jobs:
|
||||
# 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"
|
||||
"mkdir -p /mnt/appdata/ios-apps/$APP_NAME"
|
||||
scp -o StrictHostKeyChecking=no \
|
||||
iOS-hello_world.ipa iOS-hello_world.json \
|
||||
"${{ secrets.PERLIS_SSH_USER }}@${{ secrets.PERLIS_SSH_HOST }}:/mnt/appdata/ios-apps/ios-hello_world/"
|
||||
$APP_NAME.ipa $APP_NAME.json \
|
||||
"${{ secrets.PERLIS_SSH_USER }}@${{ secrets.PERLIS_SSH_HOST }}:/mnt/appdata/ios-apps/$APP_NAME/"
|
||||
|
||||
Reference in New Issue
Block a user