diff --git a/.github/workflows/prebuild-r2.yml b/.github/workflows/prebuild-r2.yml index 52f4d4b62..ed785c1af 100644 --- a/.github/workflows/prebuild-r2.yml +++ b/.github/workflows/prebuild-r2.yml @@ -1,8 +1,9 @@ name: Prebuild & Publish WDA to R2 -# Builds the prebuilt WebDriverAgentRunner artifacts (the same six zips the -# manual wda-package.yml produced) and mirrors them to Cloudflare R2 under -# releases/mobilerun-wda/, following the droidrun-ios release/preview pattern: +# Builds the prebuilt WebDriverAgentRunner artifacts (iOS + tvOS, real device + +# simulator arm64/x86_64) and mirrors them to Cloudflare R2 under +# releases/mobilerun-wda/. Real-device runners ship as .ipa; simulator builds +# stay as .zip. Follows the droidrun-ios release/preview pattern: # # release published -> releases/mobilerun-wda// + releases/mobilerun-wda/latest/ # push to master -> releases/mobilerun-wda/preview/ @@ -133,6 +134,24 @@ jobs: path: dist merge-multiple: true + - name: Repackage real-device runners as .ipa + working-directory: dist + run: | + set -eu + # Real-device runner artifacts (-Runner.zip) ship as .ipa: + # the same .app under a top-level Payload/ directory. Simulator + # builds (*-Build-Sim-*.zip) stay as plain .zip, since a simulator + # .app is installed directly rather than as an .ipa. The shared + # build-*.sh scripts, which other workflows depend on, are untouched. + for z in *-Runner.zip; do + rm -rf Payload + mkdir Payload + unzip -q "$z" -d Payload + zip -qr "${z%.zip}.ipa" Payload + rm -rf Payload "$z" + done + echo "Packages:"; ls -1 *.ipa *.zip + - name: Generate SHA256SUMS and BUILD_INFO working-directory: dist run: | @@ -142,7 +161,7 @@ jobs: else VERSION="preview-${GITHUB_SHA::7}" fi - sha256sum *.zip > SHA256SUMS + sha256sum *.ipa *.zip > SHA256SUMS { echo "version=${VERSION}" echo "commit=${GITHUB_SHA}"