Files
AIUsage/.github/workflows/ios-unsigned.yml
T

86 lines
2.8 KiB
YAML

# Unsigned release .ipa for sideloading (no Apple Developer account needed to build).
# The output must be signed on install, e.g. with Sideloadly or AltStore and a free Apple ID.
# Run it from the Actions tab ("Run workflow"), or push a tag like v1.0.0.
name: iOS unsigned IPA
on:
workflow_dispatch:
push:
tags: ['v*']
permissions:
contents: write
jobs:
ipa:
runs-on: macos-26
timeout-minutes: 75
steps:
- uses: actions/checkout@v4
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm ci
# ios/ is generated from app.json and config plugins (Continuous Native Generation)
- name: Generate the native project
run: npx expo prebuild --platform ios --clean
- name: Archive without signing
run: |
# the project is named after app.json "name" without spaces ("AI Usage" -> AIUsage)
WORKSPACE=$(ls -d ios/*.xcworkspace | head -1)
SCHEME=$(basename "$WORKSPACE" .xcworkspace)
ARCHIVE="$RUNNER_TEMP/App.xcarchive"
xcodebuild archive \
-workspace "$WORKSPACE" \
-scheme "$SCHEME" \
-configuration Release \
-destination 'generic/platform=iOS' \
-archivePath "$ARCHIVE" \
CODE_SIGNING_ALLOWED=NO \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGN_IDENTITY="" \
| tee "$RUNNER_TEMP/xcodebuild.log" | grep -E "error:|\*\* ARCHIVE" || true
ls -d "$ARCHIVE"/Products/Applications/*.app
- name: Package the .ipa
run: |
ARCHIVE="$RUNNER_TEMP/App.xcarchive"
VERSION=$(node -p "require('./app.json').expo.version")
cd "$RUNNER_TEMP"
rm -rf Payload && mkdir Payload
cp -R "$ARCHIVE"/Products/Applications/*.app Payload/
zip -qry "AIUsage-$VERSION-unsigned.ipa" Payload
echo "IPA=$RUNNER_TEMP/AIUsage-$VERSION-unsigned.ipa" >> "$GITHUB_ENV"
ls -lh "$RUNNER_TEMP"/*.ipa
- uses: actions/upload-artifact@v4
with:
name: AIUsage-unsigned-ipa
path: ${{ env.IPA }}
retention-days: 30
# a v* tag publishes a GitHub Release; the Android workflow attaches its .apk to the same one
- name: Attach to the GitHub Release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v2
with:
name: AI Usage ${{ github.ref_name }}
body_path: .github/release-notes.md
files: ${{ env.IPA }}
- name: Keep the build log on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: xcodebuild-log
path: ${{ runner.temp }}/xcodebuild.log