name: Mobile CI # The mobile app was removed from the repo for now. This workflow is kept # manual-only so the whole build/release pipeline is ready the moment a new # mobile/ app lands — just restore the push/pull_request triggers below. on: workflow_dispatch: # push: # branches: [main] # paths: ["mobile/**", ".github/workflows/mobile-ci.yml"] # pull_request: # branches: [main] # paths: ["mobile/**", ".github/workflows/mobile-ci.yml"] concurrency: group: mobile-ci-${{ github.ref }} cancel-in-progress: true jobs: desktop-checks: name: Desktop tests runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-java@v4 with: distribution: temurin java-version: 21 - uses: gradle/actions/setup-gradle@v4 - name: Run unit tests and compile desktop target working-directory: mobile run: ./gradlew :composeApp:desktopTest :composeApp:compileKotlinDesktop ios: name: iOS (unsigned IPA) needs: desktop-checks runs-on: macos-26 permissions: contents: write steps: - uses: actions/checkout@v4 - uses: actions/setup-java@v4 with: distribution: temurin java-version: 21 - uses: gradle/actions/setup-gradle@v4 - name: Select Xcode uses: maxim-lobanov/setup-xcode@v1 with: xcode-version: latest-stable - name: Archive (unsigned, device SDK) run: | xcodebuild -version xcodebuild \ -project mobile/iosApp/Tanken.xcodeproj \ -scheme Tanken \ -configuration Release \ -destination 'generic/platform=iOS' \ -archivePath "$RUNNER_TEMP/Tanken.xcarchive" \ archive \ CODE_SIGNING_ALLOWED=NO \ CODE_SIGNING_REQUIRED=NO \ CODE_SIGN_IDENTITY="" \ DEVELOPMENT_TEAM="" - name: Package unsigned IPA run: | cd "$RUNNER_TEMP" rm -rf Payload Tanken.ipa mkdir -p Payload cp -R "Tanken.xcarchive/Products/Applications/Tanken.app" "Payload/" zip -qr Tanken.ipa Payload ls -lh Tanken.ipa SIZE=$(stat -f%z Tanken.ipa) if [ "$SIZE" -gt 125829120 ]; then echo "IPA larger than 120 MB ($SIZE bytes) — investigate before shipping" exit 1 fi - name: Upload IPA artifact uses: actions/upload-artifact@v4 with: name: tanken-ios-unsigned path: ${{ runner.temp }}/Tanken.ipa if-no-files-found: error # Single rolling "dev" prerelease: the tag is moved to the current commit # and the IPA asset is replaced on every push to main (or a manual run # from main, while the workflow is dispatch-only). - name: Update rolling dev release if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main' env: GH_TOKEN: ${{ github.token }} run: | git tag -f dev git push origin dev --force NOTES="Rolling development build (commit ${GITHUB_SHA::7}, $(date -u +'%Y-%m-%d %H:%M UTC')). Unsigned IPA — sign with AltStore/SideStore." if gh release view dev --repo "$GITHUB_REPOSITORY" >/dev/null 2>&1; then gh release edit dev --repo "$GITHUB_REPOSITORY" --prerelease --title "Tanken iOS Dev" --notes "$NOTES" else gh release create dev --repo "$GITHUB_REPOSITORY" --prerelease --title "Tanken iOS Dev" --notes "$NOTES" fi gh release upload dev "$RUNNER_TEMP/Tanken.ipa" --repo "$GITHUB_REPOSITORY" --clobber