Skip to content

Instantly share code, notes, and snippets.

@peteratdivvy
Created December 15, 2022 15:36
Show Gist options
  • Save peteratdivvy/6be01d7e1a6d19c7b0de93a44a8920d9 to your computer and use it in GitHub Desktop.
Save peteratdivvy/6be01d7e1a6d19c7b0de93a44a8920d9 to your computer and use it in GitHub Desktop.
Maestro build-on-succes
#!/usr/bin/env bash
set -eox pipefail
curl -Ls "https://get.maestro.mobile.dev" | bash
export PATH="$PATH":"$HOME/.maestro/bin"
brew install java
echo 'export PATH="/opt/homebrew/opt/openjdk/bin:$PATH"' >> ~/.zshrc
sudo ln -sfn /opt/homebrew/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk
export CPPFLAGS="-I/opt/homebrew/opt/openjdk/include"
MAESTRO_API_KEY=YOURAPIKEY
APP_EXECUTABLE_PATH=/Users/expo/workingdir/build/ios/build/Build/Products/Release-iphonesimulator/YOURAPP.app
maestro cloud --apiKey $MAESTRO_API_KEY $APP_EXECUTABLE_PATH .maestro/**/*.yml
@peteratdivvy
Copy link
Author

Add this to a file called scripts/eas-build-on-success and then in your package.json, add a script "eas-build-on-success": "bash ./scripts/eas-build-on-success.sh".

On your expo build profile, make sure you and building for a simulator. We have a specific test eas profile that looks like this:

{
 "test": {
      "channel": "test",
      "distribution": "internal",
      "ios": {
        "simulator": true
      }
    }
}

Then you will see a Build Success hook in your expo build that looks like this:
image

and then resolves with:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment