How to Set Up Expo with EAS Workflows and Codex Run Actions
You can automate Expo Application Services (EAS) builds using the Codex Run actions provided in the openai/plugins repository by configuring the expo-cicd-workflows skill, validating your setup with validate.js, and triggering builds via GitHub Actions.
The openai/plugins repository provides a complete toolkit for automating Expo React Native deployments. By leveraging the Codex Run actions and EAS workflow configurations defined in plugins/expo/skills/expo-cicd-workflows, you can establish continuous integration pipelines that validate, build, and deploy your Expo applications without manual intervention.
Prerequisites
Before configuring the workflow, ensure your environment meets these requirements:
- Node.js 16 or higher – Required for running the Expo CLI and EAS CLI
- Expo CLI – Install globally with
npm i -g expo-cli - EAS CLI – Install globally with
npm i -g eas-cli - GitHub Repository – Where the workflow will execute
- EXPO_TOKEN – Store this as a repository secret in GitHub Settings (required for non-interactive EAS authentication)
Configure Expo and EAS
Initialize your Expo project and generate the required configuration files.
Initialize the Project
# Create a new Expo project
expo init my-app --template blank
cd my-app
# Initialize EAS configuration
eas init
This creates an eas.json file. The plugins/expo/skills/expo-cicd-workflows/SKILL.md file provides a production-ready template:
{
"cli": {
"version": ">= 2.0.0"
},
"build": {
"production": {
"android": {
"buildType": "apk"
},
"ios": {
"simulator": false
}
}
}
}
Set Up Codex Run Actions
The repository includes validation scripts that ensure your EAS configuration complies with the latest Expo schema.
Copy Validation Scripts
Locate the following files in the repository and copy them to your project's scripts/ directory:
plugins/expo/skills/expo-cicd-workflows/scripts/validate.js– Validateseas.jsonagainst the Expo workflow schemaplugins/expo/skills/expo-cicd-workflows/scripts/fetch.js– Handles cached fetching of the schema fromhttps://api.expo.dev/v2/workflows/schema
These scripts are referenced by the Codex Run actions defined in plugins/expo/skills/codex-expo-run-actions/SKILL.md and invoked by the agent configuration in plugins/expo/skills/codex-expo-run-actions/agents/openai.yaml.
Validate Configuration Locally
Run the validator before committing to ensure schema compliance:
node ./scripts/validate.js
The validate.js script checks your local eas.json against the remote Expo schema and exits with an error code if validation fails.
Create the GitHub Actions Workflow
Create .github/workflows/eas-build.yml in your repository to trigger Codex Run actions on push, pull request, or manual dispatch.
name: Expo EAS Build
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch: {}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install Expo CLI
run: npm i -g expo-cli
- name: Install EAS CLI
run: npm i -g eas-cli
- name: Validate EAS workflow schema
run: node ./scripts/validate.js
- name: Run EAS build
env:
EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}
run: |
eas build --platform android --profile production --non-interactive
eas build --platform ios --profile production --non-interactive
The workflow_dispatch trigger allows manual execution from the GitHub Actions UI, while the validate.js step ensures configuration errors are caught before initiating expensive build operations.
Configure Deployment Targets
For automated distribution, reference the deployment skills in the repository.
iOS TestFlight
Consult plugins/expo/skills/expo-deployment/references/ios-app-store.md for the exact command syntax to submit builds to TestFlight using eas submit --platform ios.
Google Play Store
Consult plugins/expo/skills/expo-deployment/references/play-store.md for Android track configuration and eas submit --platform android parameters.
Add these as separate steps after the build job completes successfully.
Trigger and Monitor Builds
- Push to main – The workflow triggers automatically on commits to the main branch
- Pull requests – Builds run in validation mode to verify configuration changes
- Manual triggers – Use the Run workflow button in GitHub Actions for testing or redeployment
Build artifacts appear in your Expo dashboard under the Builds section. The fetch.js script caches the Expo schema locally to reduce API calls during repeated validations.
Summary
- The
validate.jsscript inplugins/expo/skills/expo-cicd-workflows/scripts/ensures youreas.jsonmatches the current Expo schema - The
codex-expo-run-actionsskill provides the agent configuration that maps GitHub Actions to Expo CLI commands - Store
EXPO_TOKENas a GitHub secret to enable non-interactive EAS authentication - Use
workflow_dispatchto enable manual build triggers for testing configuration changes - Reference
expo-deploymentskills for App Store and Play Store submission workflows
Frequently Asked Questions
What does the validate.js script check?
The validate.js script, located at plugins/expo/skills/expo-cicd-workflows/scripts/validate.js, downloads the latest EAS workflow schema from https://api.expo.dev/v2/workflows/schema and validates your local eas.json configuration against it. It ensures your build profiles and platform settings comply with current Expo requirements before triggering expensive build operations.
Where do I store the EXPO_TOKEN for Codex Run actions?
Store your Expo access token as a repository secret named EXPO_TOKEN in your GitHub repository settings (Settings > Secrets and variables > Actions). The workflow references this via ${{ secrets.EXPO_TOKEN }} to authenticate the EAS CLI without interactive login prompts.
Can I use these actions with an existing Expo project?
Yes. The expo-cicd-workflows skill works with existing projects. Simply ensure your project has an eas.json file (run eas init if missing), copy the validation scripts from plugins/expo/skills/expo-cicd-workflows/scripts/, and add the GitHub Actions workflow to your .github/workflows/ directory.
How do I configure deployment to TestFlight or Google Play?
Refer to the deployment reference files in the repository. For iOS, consult plugins/expo/skills/expo-deployment/references/ios-app-store.md for TestFlight configuration. For Android, consult plugins/expo/skills/expo-deployment/references/play-store.md for Play Store track settings. Both documents specify the exact eas submit commands and required environment variables.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →