Private
Public Access
1
0

fix(ci): fix .app path lookup and add GITEA_TOKEN guard

- Package IPA: use find to locate .app regardless of archive subpath
- Publish: fail fast with clear message if GITEA_TOKEN is not set

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-05 23:16:54 +01:00
parent 7cbdc3cdb7
commit a516f0570d

View File

@@ -34,8 +34,16 @@ workflows:
- name: Package IPA
script: |
cd "$CM_BUILD_DIR"
# Find the .app — path varies for unsigned archives
APP=$(find SilverApple.xcarchive -name "*.app" -type d | head -1)
if [ -z "$APP" ]; then
echo "ERROR: No .app found in archive. Archive contents:"
find SilverApple.xcarchive -type d | head -30
exit 1
fi
echo "Packaging: $APP"
mkdir -p Payload
cp -r SilverApple.xcarchive/Products/Applications/SilverApple.app Payload/
cp -r "$APP" Payload/
zip -r SilverApple.ipa Payload/
rm -rf Payload
echo "IPA size: $(du -sh SilverApple.ipa | cut -f1)"
@@ -43,8 +51,9 @@ workflows:
- name: Publish to Gitea
script: |
set -exo pipefail
[ -n "$GITEA_TOKEN" ] || { echo "ERROR: GITEA_TOKEN is not set in Codemagic env vars"; exit 1; }
echo "TAG=$CM_TAG BUILD_DIR=$CM_BUILD_DIR"
echo "GITEA_API=$GITEA_API TOKEN_SET=$([ -n "$GITEA_TOKEN" ] && echo yes || echo NO)"
echo "GITEA_API=$GITEA_API TOKEN_SET=yes"
TAG="$CM_TAG"
VERSION="${TAG#v}"