From 892ce482ad966ac9478c3610b9d72b605bb230f7 Mon Sep 17 00:00:00 2001 From: Lana Begunova <70295997+lana-20@users.noreply.github.com> Date: Fri, 30 Oct 2026 18:39:57 -0700 Subject: [PATCH] Release workflow: the four builds, made on a tag and published A tag v* builds the phone and TV APKs and the iOS and Apple TV simulator apps, runs the shared unit tests on the way, and publishes them with SHA256SUMS under names that stay the same, so a CI job can download the latest without building. The Apple builds use the xcode-27 image, Xcode 27.1. A pull request that touches the workflow builds without publishing. --- .github/workflows/release.yml | 85 +++++++++++++++++++++++++++++++++++ README.md | 21 +++++++++ 2 files changed, 106 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..95c90d5 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,85 @@ +# Builds Morpho Market for every platform it runs on and, on a tag, +# publishes the builds as a GitHub release, so a check or a CI job can +# install the app under test without building it: `gh release download -R +# mobiumdev/morpho-market`, or +# https://github.com/mobiumdev/morpho-market/releases/latest/download/. +# +# The file names do not carry the version, so that latest/download URL +# stays the same from release to release. Android builds are signed with the +# runner's debug key and the iOS and tvOS builds are for the simulator, +# unsigned: an app under test, never published to a store. +# +# A pull request that changes this file builds everything and publishes +# nothing. +name: Release + +on: + push: + tags: ['v*'] + pull_request: + paths: ['.github/workflows/release.yml'] + workflow_dispatch: + +permissions: + contents: read + +jobs: + android: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - uses: actions/setup-java@v5 + with: + distribution: temurin + java-version: '21' + - run: ./gradlew --no-daemon :shared:testDebugUnitTest :app:assembleRelease :tv:assembleRelease + working-directory: android + - run: | + cp android/app/build/outputs/apk/release/app-release.apk MorphoMarket-android.apk + cp android/tv/build/outputs/apk/release/tv-release.apk MorphoMarket-android-tv.apk + - uses: actions/upload-artifact@v5 + with: + name: android + path: | + MorphoMarket-android.apk + MorphoMarket-android-tv.apk + + apple: + runs-on: xcode-27 + steps: + - uses: actions/checkout@v5 + - run: brew install xcodegen && xcodegen generate + working-directory: ios + - run: | + for target in MorphoMarket:iOS MorphoMarketTV:tvOS; do + xcodebuild -project MorphoMarket.xcodeproj -scheme "${target%%:*}" -configuration Release \ + -destination "generic/platform=${target#*:} Simulator" -derivedDataPath build \ + CODE_SIGNING_ALLOWED=NO build -quiet + done + working-directory: ios + - run: | + ditto -c -k --keepParent "ios/build/Build/Products/Release-iphonesimulator/Morpho Market.app" MorphoMarket-ios-simulator.zip + ditto -c -k --keepParent "ios/build/Build/Products/Release-appletvsimulator/Morpho Market.app" MorphoMarket-tvos-simulator.zip + - uses: actions/upload-artifact@v5 + with: + name: apple + path: | + MorphoMarket-ios-simulator.zip + MorphoMarket-tvos-simulator.zip + + release: + if: startsWith(github.ref, 'refs/tags/v') + needs: [android, apple] + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/download-artifact@v5 + with: + path: dist + merge-multiple: true + - run: sha256sum * > SHA256SUMS + working-directory: dist + - run: gh release create "$GITHUB_REF_NAME" dist/* --repo "$GITHUB_REPOSITORY" --title "Morpho Market $GITHUB_REF_NAME" --generate-notes + env: + GH_TOKEN: ${{ github.token }} diff --git a/README.md b/README.md index 6f7c8d3..556b2ba 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,7 @@ were recorded on the Meta Spatial Simulator 207.0.0.83.331 with Mobium at - [See it run](#see-it-run) - [Why it exists](#why-it-exists) - [What is in it](#what-is-in-it) +- [Install a release](#install-a-release) - [Build and install](#build-and-install) - [On a TV](#on-a-tv) - [On an Apple TV](#on-an-apple-tv) @@ -111,6 +112,26 @@ Both apps use the same accessibility ids, the same text and the same prices, so one test file drives both. No third-party dependencies in either app: Jetpack and Apple frameworks only. Money is integer cents everywhere. +## Install a release + +Each tag `v*` publishes the four builds, made by +`.github/workflows/release.yml`, under names that stay the same from release +to release: `MorphoMarket-android.apk` (phone), `MorphoMarket-android-tv.apk` +(Android TV and Fire TV), `MorphoMarket-ios-simulator.zip` and +`MorphoMarket-tvos-simulator.zip`, with `SHA256SUMS`. + +```sh +gh release download -R mobiumdev/morpho-market -p MorphoMarket-android.apk +adb install -r MorphoMarket-android.apk + +gh release download -R mobiumdev/morpho-market -p MorphoMarket-ios-simulator.zip +unzip MorphoMarket-ios-simulator.zip && xcrun simctl install "Morpho Market.app" +``` + +The APKs are signed with the build machine's debug key, so uninstall one you +built yourself before installing a release over it. The iOS and tvOS builds +run on a simulator only; for an iPhone, build it as below. + ## Build and install **The pricing reference** (Python 3):