diff --git a/.github/workflows/ios-cloud-verify.yml b/.github/workflows/ios-cloud-verify.yml new file mode 100644 index 00000000..ac8f655e --- /dev/null +++ b/.github/workflows/ios-cloud-verify.yml @@ -0,0 +1,88 @@ +name: iOS cloud verification + +on: + workflow_dispatch: + inputs: + ref: + description: Branch or commit to verify + required: true + default: ios-background-playback + +jobs: + build-ios: + runs-on: macos-latest + timeout-minutes: 120 + steps: + - name: Checkout Spotube + uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref }} + + - name: Checkout ComposeNativeWebview + uses: actions/checkout@v4 + with: + repository: KRTirtho/ComposeNativeWebview + ref: cbd36f88927298a28a2d64c6acf7ec3b2def6f9d + path: compose-webview + + - name: Set up Java + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: '21' + + - name: Set up Ruby and CocoaPods + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.3' + bundler-cache: false + + - name: Install CocoaPods + run: gem install cocoapods + + - name: Set up Rust + uses: dtolnay/rust-toolchain@stable + + - name: Publish ComposeNativeWebview + working-directory: compose-webview + run: | + chmod +x gradlew + ./gradlew publishToMavenLocal + + - name: Compile Kotlin/Native iOS + run: | + chmod +x gradlew + ./gradlew :composeApp:compileKotlinIosSimulatorArm64 + + - name: Install CocoaPods dependencies + run: | + cd iosApp + pod install --repo-update + + - name: Build unsigned iOS app + run: | + xcodebuild \ + -workspace iosApp/iosApp.xcworkspace \ + -scheme iosApp \ + -configuration Release \ + -sdk iphoneos \ + -destination 'generic/platform=iOS' \ + -derivedDataPath build/ios \ + CODE_SIGNING_ALLOWED=NO \ + CODE_SIGNING_REQUIRED=NO \ + CODE_SIGN_IDENTITY="" \ + DEVELOPMENT_TEAM="" \ + build + + - name: Package unsigned IPA + run: | + app=$(find build/ios/Build/Products/Release-iphoneos -maxdepth 1 -name '*.app' -type d | head -1) + mkdir Payload + cp -R "$app" Payload/ + zip -qry Spotube-ios-unsigned.ipa Payload + + - name: Upload IPA + uses: actions/upload-artifact@v4 + with: + name: spotube-ios-unsigned + path: Spotube-ios-unsigned.ipa