EAS Build and Deployment Workflow
Master Expo Application Services (EAS) to create professional build and deployment pipelines for your React Native apps. Learn industry best practices for CI/CD in mobile development.
What You'll Learn
- ✅ Set up EAS Build for automated builds
- ✅ Configure build profiles for different environments
- ✅ Implement EAS Submit for app store deployment
- ✅ Create CI/CD pipelines with GitHub Actions
- ✅ Set up automated testing workflows
- ✅ Manage app signing and credentials
- ✅ Deploy to production with confidence
Chapter 1: Introduction to EAS
What is EAS?
Expo Application Services (EAS) is a comprehensive platform for building, submitting, and updating React Native apps. It provides:
Core Services
- EAS Build: Cloud-based build service
- EAS Submit: Automated app store submission
- EAS Update: Over-the-air updates
- EAS Metadata: App store metadata management
Benefits Over Traditional Builds
- No local setup required: Build in the cloud
- Consistent environments: Reproducible builds
- Parallel builds: Faster development cycles
- Credential management: Secure handling of certificates
- Integration ready: Works with CI/CD systems
EAS vs Expo Classic Builds
EAS Build Advantages
- Bare React Native support: Not limited to Expo SDK
- Custom native code: Full control over native modules
- Flexible configuration: Customizable build environments
- Better performance: Optimized build infrastructure
Migration Considerations
- Cost: EAS has usage-based pricing
- Learning curve: More configuration options
- Flexibility: Greater control but more complexity
Chapter 2: Setting Up EAS Build
Prerequisites
Required Tools
``bash
Install EAS CLI
npm install -g eas-cli
Login to your Expo account
eas login
Verify installation
eas --version
`
Project Requirements
- Expo SDK 41+ or bare React Native project
- Valid Expo account
- Git repository (recommended)
Initial Configuration
Initialize EAS in Your Project
`bash
Navigate to your project directory
cd your-expo-project
Initialize EAS
eas build:configure
This creates eas.json configuration file
`
Basic eas.json Structure
`json
{
"cli": {
"version": ">= 2.0.0"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"preview": {
"distribution": "internal"
},
"production": {}
},
"submit": {
"production": {}
}
}
`
Understanding Build Profiles
Development Profile
For development and testing:
`json
"development": {
"developmentClient": true,
"distribution": "internal",
"ios": {
"resourceClass": "m1-medium"
},
"android": {
"buildType": "developmentClient"
}
}
`
Preview Profile
For internal testing and QA:
`json
"preview": {
"distribution": "internal",
"ios": {
"simulator": true
},
"android": {
"buildType": "apk"
}
}
`
Production Profile
For app store releases:
`json
"production": {
"ios": {
"resourceClass": "m1-medium"
},
"android": {
"buildType": "app-bundle"
}
}
`
Chapter 3: Build Configuration
Advanced Configuration Options
Environment Variables
`json
{
"build": {
"production": {
"env": {
"API_URL": "https://api.production.com",
"ANALYTICS_KEY": "prod-key-123"
}
},
"staging": {
"env": {
"API_URL": "https://api.staging.com",
"ANALYTICS_KEY": "staging-key-456"
}
}
}
}
`
Custom Build Scripts
`json
{
"build": {
"production": {
"ios": {
"buildConfiguration": "Release"
},
"android": {
"gradleCommand": ":app:bundleRelease"
}
}
}
}
`
Platform-Specific Configuration
iOS Configuration
`json
{
"build": {
"production": {
"ios": {
"resourceClass": "m1-medium",
"scheme": "YourApp",
"buildConfiguration": "Release",
"enterpriseProvisioning": "universal",
"autoIncrement": "buildNumber"
}
}
}
}
`
Android Configuration
`json
{
"build": {
"production": {
"android": {
"resourceClass": "medium",
"buildType": "app-bundle",
"gradleCommand": ":app:bundleRelease",
"autoIncrement": "versionCode"
}
}
}
}
`
Credential Management
Automatic Credential Management
`bash
EAS handles credentials automatically
eas build --platform ios --profile production
For first-time setup, EAS will:
1. Generate certificates
2. Create provisioning profiles
3. Store securely in EAS servers
`
Manual Credential Management
`bash
View stored credentials
eas credentials
Configure specific credentials
eas credentials:configure
Sync local credentials
eas credentials:sync
`
Running Your First Build
Build Commands
`bash
Build for specific platform and profile
eas build --platform ios --profile production
eas build --platform android --profile production
Build for all platforms
eas build --profile production
Build with custom message
eas build --profile production --message "Release v1.2.0"
`
Monitoring Build Progress
- EAS CLI: Real-time progress in terminal
- Expo Dashboard: Web interface for build monitoring
- Email notifications: Build completion alerts
- Webhooks: Custom integrations
Chapter 4: EAS Submit
Setting Up App Store Submission
iOS App Store Configuration
`json
{
"submit": {
"production": {
"ios": {
"appleId": "your-apple-id@example.com",
"ascAppId": "1234567890",
"appleTeamId": "ABCD123456"
}
}
}
}
`
Google Play Store Configuration
`json
{
"submit": {
"production": {
"android": {
"serviceAccountKeyPath": "./google-service-account.json",
"track": "production"
}
}
}
}
`
Automated Submission Workflow
Complete Build and Submit Pipeline
`bash
Build and submit in one command
eas build --platform ios --profile production --auto-submit
Or submit existing build
eas submit --platform ios --profile production --id BUILD_ID
`
Submission Profiles
`json
{
"submit": {
"production": {
"ios": {
"appleId": "your-apple-id@example.com",
"ascAppId": "1234567890"
},
"android": {
"track": "production",
"releaseStatus": "completed"
}
},
"beta": {
"ios": {
"appleId": "your-apple-id@example.com",
"ascAppId": "1234567890"
},
"android": {
"track": "beta",
"releaseStatus": "completed"
}
}
}
}
`
Chapter 5: CI/CD Integration
GitHub Actions Integration
Basic Workflow Setup
`yaml
.github/workflows/eas-build.yml
name: EAS Build
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
name: Build and Submit
runs-on: ubuntu-latest
steps:
- name: Check for EXPO_TOKEN
run: |
if [ -z "${{ secrets.EXPO_TOKEN }}" ]; then
echo "You must provide an EXPO_TOKEN secret"
exit 1
fi
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: npm
- name: Setup EAS
uses: expo/expo-github-action@v8
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Install dependencies
run: npm ci
- name: Build on EAS
run: eas build --platform all --non-interactive
`
Advanced Workflow with Testing
`yaml
name: CI/CD Pipeline
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
cache: npm
- run: npm ci
- run: npm run test
- run: npm run lint
- run: npm run type-check
build:
name: EAS Build
needs: test
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
cache: npm
- uses: expo/expo-github-action@v8
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- run: npm ci
- run: eas build --platform all --non-interactive --profile production
submit:
name: Submit to Stores
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' && contains(github.event.head_commit.message, '[release]')
steps:
- uses: actions/checkout@v3
- uses: expo/expo-github-action@v8
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- run: eas submit --platform all --non-interactive --profile production
`
Environment-Based Deployments
Branch-Based Workflows
`yaml
Different profiles for different branches
- name: Build Development
if: github.ref == 'refs/heads/develop'
run: eas build --platform all --profile development
- name: Build Staging
if: github.ref == 'refs/heads/staging'
run: eas build --platform all --profile preview
- name: Build Production
if: github.ref == 'refs/heads/main'
run: eas build --platform all --profile production
`
Chapter 6: Testing and Quality Assurance
Automated Testing Integration
Pre-Build Testing
`json
{
"build": {
"production": {
"prebuildCommand": "npm run test && npm run lint"
}
}
}
`
Test Configuration
`bash
Package.json scripts
{
"scripts": {
"test": "jest",
"test:coverage": "jest --coverage",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"type-check": "tsc --noEmit"
}
}
`
Device Testing with EAS Build
Development Client Testing
`bash
Build development client
eas build --platform ios --profile development
Install on device for testing
Use Expo Go or custom development client
`
Internal Distribution
`bash
Build for internal testing
eas build --platform all --profile preview
Share with team via Expo Dashboard
Or download directly from build page
`
Quality Gates
Build Quality Checks
`yaml
GitHub Actions quality gates
- name: Quality Gates
run: |
npm run test:coverage
npm run lint
npm run type-check
npm run security-audit
`
Chapter 7: Production Deployment
Release Management
Version Management
`json
{
"expo": {
"version": "1.2.0",
"ios": {
"buildNumber": "12"
},
"android": {
"versionCode": 12
}
}
}
`
Automated Version Bumping
`bash
Using semantic versioning
npm version patch 1.0.0 -> 1.0.1
npm version minor 1.0.0 -> 1.1.0
npm version major 1.0.0 -> 2.0.0
Update app.json automatically
`
Production Deployment Strategy
Blue-Green Deployment
`yaml
Deploy to staging first
- name: Deploy to Staging
run: eas build --profile staging
Run integration tests
- name: Integration Tests
run: npm run test:integration
Deploy to production
- name: Deploy to Production
run: eas build --profile production
`
Rollback Strategy
`bash
Keep previous builds available
eas build:list --platform ios --status finished --limit 5
Quick rollback using EAS Update
eas update --branch production --message "Rollback to previous version"
`
Monitoring and Alerting
Build Monitoring
`yaml
Slack notifications
- name: Notify Slack
if: failure()
uses: 8398a7/action-slack@v3
with:
status: failure
text: "EAS Build failed for ${{ github.ref }}"
``
Production Monitoring
- Crash reporting: Sentry, Crashlytics
- Performance monitoring: Firebase Performance
- User analytics: Amplitude, Mixpanel
- App store metrics: App Store Connect, Google Play Console
Best Practices Summary
1. Use build profiles: Separate development, staging, and production
2. Automate testing: Run tests before builds
3. Secure credentials: Use EAS credential management
4. Monitor builds: Set up notifications and alerts
5. Plan rollbacks: Have a rollback strategy ready
6. Version consistently: Use semantic versioning
7. Test thoroughly: Use development clients and internal distribution
Conclusion
EAS Build and deployment workflows provide a robust foundation for professional mobile app development. By implementing proper CI/CD practices, automated testing, and monitoring, you can deliver high-quality apps with confidence.
Ready to deploy your app? Start with perfect icons using our [Icon Generator](/)!
- ✅ Set up EAS Build for automated builds
- ✅ Configure build profiles for different environments
- ✅ Implement EAS Submit for app store deployment
- ✅ Create CI/CD pipelines with GitHub Actions
- ✅ Set up automated testing workflows
- ✅ Manage app signing and credentials
- ✅ Deploy to production with confidence
Chapter 1: Introduction to EAS
What is EAS?
Expo Application Services (EAS) is a comprehensive platform for building, submitting, and updating React Native apps. It provides:
Core Services
- EAS Build: Cloud-based build service
- EAS Submit: Automated app store submission
- EAS Update: Over-the-air updates
- EAS Metadata: App store metadata management
Benefits Over Traditional Builds
- No local setup required: Build in the cloud
- Consistent environments: Reproducible builds
- Parallel builds: Faster development cycles
- Credential management: Secure handling of certificates
- Integration ready: Works with CI/CD systems
EAS vs Expo Classic Builds
EAS Build Advantages
- Bare React Native support: Not limited to Expo SDK
- Custom native code: Full control over native modules
- Flexible configuration: Customizable build environments
- Better performance: Optimized build infrastructure
Migration Considerations
- Cost: EAS has usage-based pricing
- Learning curve: More configuration options
- Flexibility: Greater control but more complexity
Chapter 2: Setting Up EAS Build
Prerequisites
Required Tools
``bash
Install EAS CLI
npm install -g eas-cli
Login to your Expo account
eas login
Verify installation
eas --version
`
Project Requirements
- Expo SDK 41+ or bare React Native project
- Valid Expo account
- Git repository (recommended)
Initial Configuration
Initialize EAS in Your Project
`bash
Navigate to your project directory
cd your-expo-project
Initialize EAS
eas build:configure
This creates eas.json configuration file
`
Basic eas.json Structure
`json
{
"cli": {
"version": ">= 2.0.0"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"preview": {
"distribution": "internal"
},
"production": {}
},
"submit": {
"production": {}
}
}
`
Understanding Build Profiles
Development Profile
For development and testing:
`json
"development": {
"developmentClient": true,
"distribution": "internal",
"ios": {
"resourceClass": "m1-medium"
},
"android": {
"buildType": "developmentClient"
}
}
`
Preview Profile
For internal testing and QA:
`json
"preview": {
"distribution": "internal",
"ios": {
"simulator": true
},
"android": {
"buildType": "apk"
}
}
`
Production Profile
For app store releases:
`json
"production": {
"ios": {
"resourceClass": "m1-medium"
},
"android": {
"buildType": "app-bundle"
}
}
`
Chapter 3: Build Configuration
Advanced Configuration Options
Environment Variables
`json
{
"build": {
"production": {
"env": {
"API_URL": "https://api.production.com",
"ANALYTICS_KEY": "prod-key-123"
}
},
"staging": {
"env": {
"API_URL": "https://api.staging.com",
"ANALYTICS_KEY": "staging-key-456"
}
}
}
}
`
Custom Build Scripts
`json
{
"build": {
"production": {
"ios": {
"buildConfiguration": "Release"
},
"android": {
"gradleCommand": ":app:bundleRelease"
}
}
}
}
`
Platform-Specific Configuration
iOS Configuration
`json
{
"build": {
"production": {
"ios": {
"resourceClass": "m1-medium",
"scheme": "YourApp",
"buildConfiguration": "Release",
"enterpriseProvisioning": "universal",
"autoIncrement": "buildNumber"
}
}
}
}
`
Android Configuration
`json
{
"build": {
"production": {
"android": {
"resourceClass": "medium",
"buildType": "app-bundle",
"gradleCommand": ":app:bundleRelease",
"autoIncrement": "versionCode"
}
}
}
}
`
Credential Management
Automatic Credential Management
`bash
EAS handles credentials automatically
eas build --platform ios --profile production
For first-time setup, EAS will:
1. Generate certificates
2. Create provisioning profiles
3. Store securely in EAS servers
`
Manual Credential Management
`bash
View stored credentials
eas credentials
Configure specific credentials
eas credentials:configure
Sync local credentials
eas credentials:sync
`
Running Your First Build
Build Commands
`bash
Build for specific platform and profile
eas build --platform ios --profile production
eas build --platform android --profile production
Build for all platforms
eas build --profile production
Build with custom message
eas build --profile production --message "Release v1.2.0"
`
Monitoring Build Progress
- EAS CLI: Real-time progress in terminal
- Expo Dashboard: Web interface for build monitoring
- Email notifications: Build completion alerts
- Webhooks: Custom integrations
Chapter 4: EAS Submit
Setting Up App Store Submission
iOS App Store Configuration
`json
{
"submit": {
"production": {
"ios": {
"appleId": "your-apple-id@example.com",
"ascAppId": "1234567890",
"appleTeamId": "ABCD123456"
}
}
}
}
`
Google Play Store Configuration
`json
{
"submit": {
"production": {
"android": {
"serviceAccountKeyPath": "./google-service-account.json",
"track": "production"
}
}
}
}
`
Automated Submission Workflow
Complete Build and Submit Pipeline
`bash
Build and submit in one command
eas build --platform ios --profile production --auto-submit
Or submit existing build
eas submit --platform ios --profile production --id BUILD_ID
`
Submission Profiles
`json
{
"submit": {
"production": {
"ios": {
"appleId": "your-apple-id@example.com",
"ascAppId": "1234567890"
},
"android": {
"track": "production",
"releaseStatus": "completed"
}
},
"beta": {
"ios": {
"appleId": "your-apple-id@example.com",
"ascAppId": "1234567890"
},
"android": {
"track": "beta",
"releaseStatus": "completed"
}
}
}
}
`
Chapter 5: CI/CD Integration
GitHub Actions Integration
Basic Workflow Setup
`yaml
.github/workflows/eas-build.yml
name: EAS Build
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
name: Build and Submit
runs-on: ubuntu-latest
steps:
- name: Check for EXPO_TOKEN
run: |
if [ -z "${{ secrets.EXPO_TOKEN }}" ]; then
echo "You must provide an EXPO_TOKEN secret"
exit 1
fi
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: npm
- name: Setup EAS
uses: expo/expo-github-action@v8
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Install dependencies
run: npm ci
- name: Build on EAS
run: eas build --platform all --non-interactive
`
Advanced Workflow with Testing
`yaml
name: CI/CD Pipeline
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
cache: npm
- run: npm ci
- run: npm run test
- run: npm run lint
- run: npm run type-check
build:
name: EAS Build
needs: test
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
cache: npm
- uses: expo/expo-github-action@v8
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- run: npm ci
- run: eas build --platform all --non-interactive --profile production
submit:
name: Submit to Stores
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' && contains(github.event.head_commit.message, '[release]')
steps:
- uses: actions/checkout@v3
- uses: expo/expo-github-action@v8
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- run: eas submit --platform all --non-interactive --profile production
`
Environment-Based Deployments
Branch-Based Workflows
`yaml
Different profiles for different branches
- name: Build Development
if: github.ref == 'refs/heads/develop'
run: eas build --platform all --profile development
- name: Build Staging
if: github.ref == 'refs/heads/staging'
run: eas build --platform all --profile preview
- name: Build Production
if: github.ref == 'refs/heads/main'
run: eas build --platform all --profile production
`
Chapter 6: Testing and Quality Assurance
Automated Testing Integration
Pre-Build Testing
`json
{
"build": {
"production": {
"prebuildCommand": "npm run test && npm run lint"
}
}
}
`
Test Configuration
`bash
Package.json scripts
{
"scripts": {
"test": "jest",
"test:coverage": "jest --coverage",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"type-check": "tsc --noEmit"
}
}
`
Device Testing with EAS Build
Development Client Testing
`bash
Build development client
eas build --platform ios --profile development
Install on device for testing
Use Expo Go or custom development client
`
Internal Distribution
`bash
Build for internal testing
eas build --platform all --profile preview
Share with team via Expo Dashboard
Or download directly from build page
`
Quality Gates
Build Quality Checks
`yaml
GitHub Actions quality gates
- name: Quality Gates
run: |
npm run test:coverage
npm run lint
npm run type-check
npm run security-audit
`
Chapter 7: Production Deployment
Release Management
Version Management
`json
{
"expo": {
"version": "1.2.0",
"ios": {
"buildNumber": "12"
},
"android": {
"versionCode": 12
}
}
}
`
Automated Version Bumping
`bash
Using semantic versioning
npm version patch 1.0.0 -> 1.0.1
npm version minor 1.0.0 -> 1.1.0
npm version major 1.0.0 -> 2.0.0
Update app.json automatically
`
Production Deployment Strategy
Blue-Green Deployment
`yaml
Deploy to staging first
- name: Deploy to Staging
run: eas build --profile staging
Run integration tests
- name: Integration Tests
run: npm run test:integration
Deploy to production
- name: Deploy to Production
run: eas build --profile production
`
Rollback Strategy
`bash
Keep previous builds available
eas build:list --platform ios --status finished --limit 5
Quick rollback using EAS Update
eas update --branch production --message "Rollback to previous version"
`
Monitoring and Alerting
Build Monitoring
`yaml
Slack notifications
- name: Notify Slack
if: failure()
uses: 8398a7/action-slack@v3
with:
status: failure
text: "EAS Build failed for ${{ github.ref }}"
``
Production Monitoring
- Crash reporting: Sentry, Crashlytics
- Performance monitoring: Firebase Performance
- User analytics: Amplitude, Mixpanel
- App store metrics: App Store Connect, Google Play Console
Best Practices Summary
1. Use build profiles: Separate development, staging, and production
2. Automate testing: Run tests before builds
3. Secure credentials: Use EAS credential management
4. Monitor builds: Set up notifications and alerts
5. Plan rollbacks: Have a rollback strategy ready
6. Version consistently: Use semantic versioning
7. Test thoroughly: Use development clients and internal distribution
Conclusion
EAS Build and deployment workflows provide a robust foundation for professional mobile app development. By implementing proper CI/CD practices, automated testing, and monitoring, you can deliver high-quality apps with confidence.
Ready to deploy your app? Start with perfect icons using our [Icon Generator](/)!
Expo Application Services (EAS) is a comprehensive platform for building, submitting, and updating React Native apps. It provides:
Core Services
- EAS Build: Cloud-based build service
- EAS Submit: Automated app store submission
- EAS Update: Over-the-air updates
- EAS Metadata: App store metadata management
Benefits Over Traditional Builds
- No local setup required: Build in the cloud
- Consistent environments: Reproducible builds
- Parallel builds: Faster development cycles
- Credential management: Secure handling of certificates
- Integration ready: Works with CI/CD systems
EAS vs Expo Classic Builds
EAS Build Advantages
- Bare React Native support: Not limited to Expo SDK
- Custom native code: Full control over native modules
- Flexible configuration: Customizable build environments
- Better performance: Optimized build infrastructure
Migration Considerations
- Cost: EAS has usage-based pricing
- Learning curve: More configuration options
- Flexibility: Greater control but more complexity
Chapter 2: Setting Up EAS Build
Prerequisites
Required Tools
``bash
Install EAS CLI
npm install -g eas-cli
Login to your Expo account
eas login
Verify installation
eas --version
`
Project Requirements
- Expo SDK 41+ or bare React Native project
- Valid Expo account
- Git repository (recommended)
Initial Configuration
Initialize EAS in Your Project
`bash
Navigate to your project directory
cd your-expo-project
Initialize EAS
eas build:configure
This creates eas.json configuration file
`
Basic eas.json Structure
`json
{
"cli": {
"version": ">= 2.0.0"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"preview": {
"distribution": "internal"
},
"production": {}
},
"submit": {
"production": {}
}
}
`
Understanding Build Profiles
Development Profile
For development and testing:
`json
"development": {
"developmentClient": true,
"distribution": "internal",
"ios": {
"resourceClass": "m1-medium"
},
"android": {
"buildType": "developmentClient"
}
}
`
Preview Profile
For internal testing and QA:
`json
"preview": {
"distribution": "internal",
"ios": {
"simulator": true
},
"android": {
"buildType": "apk"
}
}
`
Production Profile
For app store releases:
`json
"production": {
"ios": {
"resourceClass": "m1-medium"
},
"android": {
"buildType": "app-bundle"
}
}
`
Chapter 3: Build Configuration
Advanced Configuration Options
Environment Variables
`json
{
"build": {
"production": {
"env": {
"API_URL": "https://api.production.com",
"ANALYTICS_KEY": "prod-key-123"
}
},
"staging": {
"env": {
"API_URL": "https://api.staging.com",
"ANALYTICS_KEY": "staging-key-456"
}
}
}
}
`
Custom Build Scripts
`json
{
"build": {
"production": {
"ios": {
"buildConfiguration": "Release"
},
"android": {
"gradleCommand": ":app:bundleRelease"
}
}
}
}
`
Platform-Specific Configuration
iOS Configuration
`json
{
"build": {
"production": {
"ios": {
"resourceClass": "m1-medium",
"scheme": "YourApp",
"buildConfiguration": "Release",
"enterpriseProvisioning": "universal",
"autoIncrement": "buildNumber"
}
}
}
}
`
Android Configuration
`json
{
"build": {
"production": {
"android": {
"resourceClass": "medium",
"buildType": "app-bundle",
"gradleCommand": ":app:bundleRelease",
"autoIncrement": "versionCode"
}
}
}
}
`
Credential Management
Automatic Credential Management
`bash
EAS handles credentials automatically
eas build --platform ios --profile production
For first-time setup, EAS will:
1. Generate certificates
2. Create provisioning profiles
3. Store securely in EAS servers
`
Manual Credential Management
`bash
View stored credentials
eas credentials
Configure specific credentials
eas credentials:configure
Sync local credentials
eas credentials:sync
`
Running Your First Build
Build Commands
`bash
Build for specific platform and profile
eas build --platform ios --profile production
eas build --platform android --profile production
Build for all platforms
eas build --profile production
Build with custom message
eas build --profile production --message "Release v1.2.0"
`
Monitoring Build Progress
- EAS CLI: Real-time progress in terminal
- Expo Dashboard: Web interface for build monitoring
- Email notifications: Build completion alerts
- Webhooks: Custom integrations
Chapter 4: EAS Submit
Setting Up App Store Submission
iOS App Store Configuration
`json
{
"submit": {
"production": {
"ios": {
"appleId": "your-apple-id@example.com",
"ascAppId": "1234567890",
"appleTeamId": "ABCD123456"
}
}
}
}
`
Google Play Store Configuration
`json
{
"submit": {
"production": {
"android": {
"serviceAccountKeyPath": "./google-service-account.json",
"track": "production"
}
}
}
}
`
Automated Submission Workflow
Complete Build and Submit Pipeline
`bash
Build and submit in one command
eas build --platform ios --profile production --auto-submit
Or submit existing build
eas submit --platform ios --profile production --id BUILD_ID
`
Submission Profiles
`json
{
"submit": {
"production": {
"ios": {
"appleId": "your-apple-id@example.com",
"ascAppId": "1234567890"
},
"android": {
"track": "production",
"releaseStatus": "completed"
}
},
"beta": {
"ios": {
"appleId": "your-apple-id@example.com",
"ascAppId": "1234567890"
},
"android": {
"track": "beta",
"releaseStatus": "completed"
}
}
}
}
`
Chapter 5: CI/CD Integration
GitHub Actions Integration
Basic Workflow Setup
`yaml
.github/workflows/eas-build.yml
name: EAS Build
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
name: Build and Submit
runs-on: ubuntu-latest
steps:
- name: Check for EXPO_TOKEN
run: |
if [ -z "${{ secrets.EXPO_TOKEN }}" ]; then
echo "You must provide an EXPO_TOKEN secret"
exit 1
fi
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: npm
- name: Setup EAS
uses: expo/expo-github-action@v8
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Install dependencies
run: npm ci
- name: Build on EAS
run: eas build --platform all --non-interactive
`
Advanced Workflow with Testing
`yaml
name: CI/CD Pipeline
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
cache: npm
- run: npm ci
- run: npm run test
- run: npm run lint
- run: npm run type-check
build:
name: EAS Build
needs: test
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
cache: npm
- uses: expo/expo-github-action@v8
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- run: npm ci
- run: eas build --platform all --non-interactive --profile production
submit:
name: Submit to Stores
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' && contains(github.event.head_commit.message, '[release]')
steps:
- uses: actions/checkout@v3
- uses: expo/expo-github-action@v8
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- run: eas submit --platform all --non-interactive --profile production
`
Environment-Based Deployments
Branch-Based Workflows
`yaml
Different profiles for different branches
- name: Build Development
if: github.ref == 'refs/heads/develop'
run: eas build --platform all --profile development
- name: Build Staging
if: github.ref == 'refs/heads/staging'
run: eas build --platform all --profile preview
- name: Build Production
if: github.ref == 'refs/heads/main'
run: eas build --platform all --profile production
`
Chapter 6: Testing and Quality Assurance
Automated Testing Integration
Pre-Build Testing
`json
{
"build": {
"production": {
"prebuildCommand": "npm run test && npm run lint"
}
}
}
`
Test Configuration
`bash
Package.json scripts
{
"scripts": {
"test": "jest",
"test:coverage": "jest --coverage",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"type-check": "tsc --noEmit"
}
}
`
Device Testing with EAS Build
Development Client Testing
`bash
Build development client
eas build --platform ios --profile development
Install on device for testing
Use Expo Go or custom development client
`
Internal Distribution
`bash
Build for internal testing
eas build --platform all --profile preview
Share with team via Expo Dashboard
Or download directly from build page
`
Quality Gates
Build Quality Checks
`yaml
GitHub Actions quality gates
- name: Quality Gates
run: |
npm run test:coverage
npm run lint
npm run type-check
npm run security-audit
`
Chapter 7: Production Deployment
Release Management
Version Management
`json
{
"expo": {
"version": "1.2.0",
"ios": {
"buildNumber": "12"
},
"android": {
"versionCode": 12
}
}
}
`
Automated Version Bumping
`bash
Using semantic versioning
npm version patch 1.0.0 -> 1.0.1
npm version minor 1.0.0 -> 1.1.0
npm version major 1.0.0 -> 2.0.0
Update app.json automatically
`
Production Deployment Strategy
Blue-Green Deployment
`yaml
Deploy to staging first
- name: Deploy to Staging
run: eas build --profile staging
Run integration tests
- name: Integration Tests
run: npm run test:integration
Deploy to production
- name: Deploy to Production
run: eas build --profile production
`
Rollback Strategy
`bash
Keep previous builds available
eas build:list --platform ios --status finished --limit 5
Quick rollback using EAS Update
eas update --branch production --message "Rollback to previous version"
`
Monitoring and Alerting
Build Monitoring
`yaml
Slack notifications
- name: Notify Slack
if: failure()
uses: 8398a7/action-slack@v3
with:
status: failure
text: "EAS Build failed for ${{ github.ref }}"
``
Production Monitoring
- Crash reporting: Sentry, Crashlytics
- Performance monitoring: Firebase Performance
- User analytics: Amplitude, Mixpanel
- App store metrics: App Store Connect, Google Play Console
Best Practices Summary
1. Use build profiles: Separate development, staging, and production
2. Automate testing: Run tests before builds
3. Secure credentials: Use EAS credential management
4. Monitor builds: Set up notifications and alerts
5. Plan rollbacks: Have a rollback strategy ready
6. Version consistently: Use semantic versioning
7. Test thoroughly: Use development clients and internal distribution
Conclusion
EAS Build and deployment workflows provide a robust foundation for professional mobile app development. By implementing proper CI/CD practices, automated testing, and monitoring, you can deliver high-quality apps with confidence.
Ready to deploy your app? Start with perfect icons using our [Icon Generator](/)!
- No local setup required: Build in the cloud
- Consistent environments: Reproducible builds
- Parallel builds: Faster development cycles
- Credential management: Secure handling of certificates
- Integration ready: Works with CI/CD systems
EAS vs Expo Classic Builds
EAS Build Advantages
- Bare React Native support: Not limited to Expo SDK
- Custom native code: Full control over native modules
- Flexible configuration: Customizable build environments
- Better performance: Optimized build infrastructure
Migration Considerations
- Cost: EAS has usage-based pricing
- Learning curve: More configuration options
- Flexibility: Greater control but more complexity
Chapter 2: Setting Up EAS Build
Prerequisites
Required Tools
``bash
Install EAS CLI
npm install -g eas-cli
Login to your Expo account
eas login
Verify installation
eas --version
`
Project Requirements
- Expo SDK 41+ or bare React Native project
- Valid Expo account
- Git repository (recommended)
Initial Configuration
Initialize EAS in Your Project
`bash
Navigate to your project directory
cd your-expo-project
Initialize EAS
eas build:configure
This creates eas.json configuration file
`
Basic eas.json Structure
`json
{
"cli": {
"version": ">= 2.0.0"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"preview": {
"distribution": "internal"
},
"production": {}
},
"submit": {
"production": {}
}
}
`
Understanding Build Profiles
Development Profile
For development and testing:
`json
"development": {
"developmentClient": true,
"distribution": "internal",
"ios": {
"resourceClass": "m1-medium"
},
"android": {
"buildType": "developmentClient"
}
}
`
Preview Profile
For internal testing and QA:
`json
"preview": {
"distribution": "internal",
"ios": {
"simulator": true
},
"android": {
"buildType": "apk"
}
}
`
Production Profile
For app store releases:
`json
"production": {
"ios": {
"resourceClass": "m1-medium"
},
"android": {
"buildType": "app-bundle"
}
}
`
Chapter 3: Build Configuration
Advanced Configuration Options
Environment Variables
`json
{
"build": {
"production": {
"env": {
"API_URL": "https://api.production.com",
"ANALYTICS_KEY": "prod-key-123"
}
},
"staging": {
"env": {
"API_URL": "https://api.staging.com",
"ANALYTICS_KEY": "staging-key-456"
}
}
}
}
`
Custom Build Scripts
`json
{
"build": {
"production": {
"ios": {
"buildConfiguration": "Release"
},
"android": {
"gradleCommand": ":app:bundleRelease"
}
}
}
}
`
Platform-Specific Configuration
iOS Configuration
`json
{
"build": {
"production": {
"ios": {
"resourceClass": "m1-medium",
"scheme": "YourApp",
"buildConfiguration": "Release",
"enterpriseProvisioning": "universal",
"autoIncrement": "buildNumber"
}
}
}
}
`
Android Configuration
`json
{
"build": {
"production": {
"android": {
"resourceClass": "medium",
"buildType": "app-bundle",
"gradleCommand": ":app:bundleRelease",
"autoIncrement": "versionCode"
}
}
}
}
`
Credential Management
Automatic Credential Management
`bash
EAS handles credentials automatically
eas build --platform ios --profile production
For first-time setup, EAS will:
1. Generate certificates
2. Create provisioning profiles
3. Store securely in EAS servers
`
Manual Credential Management
`bash
View stored credentials
eas credentials
Configure specific credentials
eas credentials:configure
Sync local credentials
eas credentials:sync
`
Running Your First Build
Build Commands
`bash
Build for specific platform and profile
eas build --platform ios --profile production
eas build --platform android --profile production
Build for all platforms
eas build --profile production
Build with custom message
eas build --profile production --message "Release v1.2.0"
`
Monitoring Build Progress
- EAS CLI: Real-time progress in terminal
- Expo Dashboard: Web interface for build monitoring
- Email notifications: Build completion alerts
- Webhooks: Custom integrations
Chapter 4: EAS Submit
Setting Up App Store Submission
iOS App Store Configuration
`json
{
"submit": {
"production": {
"ios": {
"appleId": "your-apple-id@example.com",
"ascAppId": "1234567890",
"appleTeamId": "ABCD123456"
}
}
}
}
`
Google Play Store Configuration
`json
{
"submit": {
"production": {
"android": {
"serviceAccountKeyPath": "./google-service-account.json",
"track": "production"
}
}
}
}
`
Automated Submission Workflow
Complete Build and Submit Pipeline
`bash
Build and submit in one command
eas build --platform ios --profile production --auto-submit
Or submit existing build
eas submit --platform ios --profile production --id BUILD_ID
`
Submission Profiles
`json
{
"submit": {
"production": {
"ios": {
"appleId": "your-apple-id@example.com",
"ascAppId": "1234567890"
},
"android": {
"track": "production",
"releaseStatus": "completed"
}
},
"beta": {
"ios": {
"appleId": "your-apple-id@example.com",
"ascAppId": "1234567890"
},
"android": {
"track": "beta",
"releaseStatus": "completed"
}
}
}
}
`
Chapter 5: CI/CD Integration
GitHub Actions Integration
Basic Workflow Setup
`yaml
.github/workflows/eas-build.yml
name: EAS Build
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
name: Build and Submit
runs-on: ubuntu-latest
steps:
- name: Check for EXPO_TOKEN
run: |
if [ -z "${{ secrets.EXPO_TOKEN }}" ]; then
echo "You must provide an EXPO_TOKEN secret"
exit 1
fi
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: npm
- name: Setup EAS
uses: expo/expo-github-action@v8
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Install dependencies
run: npm ci
- name: Build on EAS
run: eas build --platform all --non-interactive
`
Advanced Workflow with Testing
`yaml
name: CI/CD Pipeline
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
cache: npm
- run: npm ci
- run: npm run test
- run: npm run lint
- run: npm run type-check
build:
name: EAS Build
needs: test
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
cache: npm
- uses: expo/expo-github-action@v8
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- run: npm ci
- run: eas build --platform all --non-interactive --profile production
submit:
name: Submit to Stores
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' && contains(github.event.head_commit.message, '[release]')
steps:
- uses: actions/checkout@v3
- uses: expo/expo-github-action@v8
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- run: eas submit --platform all --non-interactive --profile production
`
Environment-Based Deployments
Branch-Based Workflows
`yaml
Different profiles for different branches
- name: Build Development
if: github.ref == 'refs/heads/develop'
run: eas build --platform all --profile development
- name: Build Staging
if: github.ref == 'refs/heads/staging'
run: eas build --platform all --profile preview
- name: Build Production
if: github.ref == 'refs/heads/main'
run: eas build --platform all --profile production
`
Chapter 6: Testing and Quality Assurance
Automated Testing Integration
Pre-Build Testing
`json
{
"build": {
"production": {
"prebuildCommand": "npm run test && npm run lint"
}
}
}
`
Test Configuration
`bash
Package.json scripts
{
"scripts": {
"test": "jest",
"test:coverage": "jest --coverage",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"type-check": "tsc --noEmit"
}
}
`
Device Testing with EAS Build
Development Client Testing
`bash
Build development client
eas build --platform ios --profile development
Install on device for testing
Use Expo Go or custom development client
`
Internal Distribution
`bash
Build for internal testing
eas build --platform all --profile preview
Share with team via Expo Dashboard
Or download directly from build page
`
Quality Gates
Build Quality Checks
`yaml
GitHub Actions quality gates
- name: Quality Gates
run: |
npm run test:coverage
npm run lint
npm run type-check
npm run security-audit
`
Chapter 7: Production Deployment
Release Management
Version Management
`json
{
"expo": {
"version": "1.2.0",
"ios": {
"buildNumber": "12"
},
"android": {
"versionCode": 12
}
}
}
`
Automated Version Bumping
`bash
Using semantic versioning
npm version patch 1.0.0 -> 1.0.1
npm version minor 1.0.0 -> 1.1.0
npm version major 1.0.0 -> 2.0.0
Update app.json automatically
`
Production Deployment Strategy
Blue-Green Deployment
`yaml
Deploy to staging first
- name: Deploy to Staging
run: eas build --profile staging
Run integration tests
- name: Integration Tests
run: npm run test:integration
Deploy to production
- name: Deploy to Production
run: eas build --profile production
`
Rollback Strategy
`bash
Keep previous builds available
eas build:list --platform ios --status finished --limit 5
Quick rollback using EAS Update
eas update --branch production --message "Rollback to previous version"
`
Monitoring and Alerting
Build Monitoring
`yaml
Slack notifications
- name: Notify Slack
if: failure()
uses: 8398a7/action-slack@v3
with:
status: failure
text: "EAS Build failed for ${{ github.ref }}"
``
Production Monitoring
- Crash reporting: Sentry, Crashlytics
- Performance monitoring: Firebase Performance
- User analytics: Amplitude, Mixpanel
- App store metrics: App Store Connect, Google Play Console
Best Practices Summary
1. Use build profiles: Separate development, staging, and production
2. Automate testing: Run tests before builds
3. Secure credentials: Use EAS credential management
4. Monitor builds: Set up notifications and alerts
5. Plan rollbacks: Have a rollback strategy ready
6. Version consistently: Use semantic versioning
7. Test thoroughly: Use development clients and internal distribution
Conclusion
EAS Build and deployment workflows provide a robust foundation for professional mobile app development. By implementing proper CI/CD practices, automated testing, and monitoring, you can deliver high-quality apps with confidence.
Ready to deploy your app? Start with perfect icons using our [Icon Generator](/)!
- Bare React Native support: Not limited to Expo SDK
- Custom native code: Full control over native modules
- Flexible configuration: Customizable build environments
- Better performance: Optimized build infrastructure
Migration Considerations
- Cost: EAS has usage-based pricing
- Learning curve: More configuration options
- Flexibility: Greater control but more complexity
Chapter 2: Setting Up EAS Build
Prerequisites
Required Tools
``bash
Install EAS CLI
npm install -g eas-cli
Login to your Expo account
eas login
Verify installation
eas --version
`
Project Requirements
- Expo SDK 41+ or bare React Native project
- Valid Expo account
- Git repository (recommended)
Initial Configuration
Initialize EAS in Your Project
`bash
Navigate to your project directory
cd your-expo-project
Initialize EAS
eas build:configure
This creates eas.json configuration file
`
Basic eas.json Structure
`json
{
"cli": {
"version": ">= 2.0.0"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"preview": {
"distribution": "internal"
},
"production": {}
},
"submit": {
"production": {}
}
}
`
Understanding Build Profiles
Development Profile
For development and testing:
`json
"development": {
"developmentClient": true,
"distribution": "internal",
"ios": {
"resourceClass": "m1-medium"
},
"android": {
"buildType": "developmentClient"
}
}
`
Preview Profile
For internal testing and QA:
`json
"preview": {
"distribution": "internal",
"ios": {
"simulator": true
},
"android": {
"buildType": "apk"
}
}
`
Production Profile
For app store releases:
`json
"production": {
"ios": {
"resourceClass": "m1-medium"
},
"android": {
"buildType": "app-bundle"
}
}
`
Chapter 3: Build Configuration
Advanced Configuration Options
Environment Variables
`json
{
"build": {
"production": {
"env": {
"API_URL": "https://api.production.com",
"ANALYTICS_KEY": "prod-key-123"
}
},
"staging": {
"env": {
"API_URL": "https://api.staging.com",
"ANALYTICS_KEY": "staging-key-456"
}
}
}
}
`
Custom Build Scripts
`json
{
"build": {
"production": {
"ios": {
"buildConfiguration": "Release"
},
"android": {
"gradleCommand": ":app:bundleRelease"
}
}
}
}
`
Platform-Specific Configuration
iOS Configuration
`json
{
"build": {
"production": {
"ios": {
"resourceClass": "m1-medium",
"scheme": "YourApp",
"buildConfiguration": "Release",
"enterpriseProvisioning": "universal",
"autoIncrement": "buildNumber"
}
}
}
}
`
Android Configuration
`json
{
"build": {
"production": {
"android": {
"resourceClass": "medium",
"buildType": "app-bundle",
"gradleCommand": ":app:bundleRelease",
"autoIncrement": "versionCode"
}
}
}
}
`
Credential Management
Automatic Credential Management
`bash
EAS handles credentials automatically
eas build --platform ios --profile production
For first-time setup, EAS will:
1. Generate certificates
2. Create provisioning profiles
3. Store securely in EAS servers
`
Manual Credential Management
`bash
View stored credentials
eas credentials
Configure specific credentials
eas credentials:configure
Sync local credentials
eas credentials:sync
`
Running Your First Build
Build Commands
`bash
Build for specific platform and profile
eas build --platform ios --profile production
eas build --platform android --profile production
Build for all platforms
eas build --profile production
Build with custom message
eas build --profile production --message "Release v1.2.0"
`
Monitoring Build Progress
- EAS CLI: Real-time progress in terminal
- Expo Dashboard: Web interface for build monitoring
- Email notifications: Build completion alerts
- Webhooks: Custom integrations
Chapter 4: EAS Submit
Setting Up App Store Submission
iOS App Store Configuration
`json
{
"submit": {
"production": {
"ios": {
"appleId": "your-apple-id@example.com",
"ascAppId": "1234567890",
"appleTeamId": "ABCD123456"
}
}
}
}
`
Google Play Store Configuration
`json
{
"submit": {
"production": {
"android": {
"serviceAccountKeyPath": "./google-service-account.json",
"track": "production"
}
}
}
}
`
Automated Submission Workflow
Complete Build and Submit Pipeline
`bash
Build and submit in one command
eas build --platform ios --profile production --auto-submit
Or submit existing build
eas submit --platform ios --profile production --id BUILD_ID
`
Submission Profiles
`json
{
"submit": {
"production": {
"ios": {
"appleId": "your-apple-id@example.com",
"ascAppId": "1234567890"
},
"android": {
"track": "production",
"releaseStatus": "completed"
}
},
"beta": {
"ios": {
"appleId": "your-apple-id@example.com",
"ascAppId": "1234567890"
},
"android": {
"track": "beta",
"releaseStatus": "completed"
}
}
}
}
`
Chapter 5: CI/CD Integration
GitHub Actions Integration
Basic Workflow Setup
`yaml
.github/workflows/eas-build.yml
name: EAS Build
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
name: Build and Submit
runs-on: ubuntu-latest
steps:
- name: Check for EXPO_TOKEN
run: |
if [ -z "${{ secrets.EXPO_TOKEN }}" ]; then
echo "You must provide an EXPO_TOKEN secret"
exit 1
fi
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: npm
- name: Setup EAS
uses: expo/expo-github-action@v8
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Install dependencies
run: npm ci
- name: Build on EAS
run: eas build --platform all --non-interactive
`
Advanced Workflow with Testing
`yaml
name: CI/CD Pipeline
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
cache: npm
- run: npm ci
- run: npm run test
- run: npm run lint
- run: npm run type-check
build:
name: EAS Build
needs: test
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
cache: npm
- uses: expo/expo-github-action@v8
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- run: npm ci
- run: eas build --platform all --non-interactive --profile production
submit:
name: Submit to Stores
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' && contains(github.event.head_commit.message, '[release]')
steps:
- uses: actions/checkout@v3
- uses: expo/expo-github-action@v8
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- run: eas submit --platform all --non-interactive --profile production
`
Environment-Based Deployments
Branch-Based Workflows
`yaml
Different profiles for different branches
- name: Build Development
if: github.ref == 'refs/heads/develop'
run: eas build --platform all --profile development
- name: Build Staging
if: github.ref == 'refs/heads/staging'
run: eas build --platform all --profile preview
- name: Build Production
if: github.ref == 'refs/heads/main'
run: eas build --platform all --profile production
`
Chapter 6: Testing and Quality Assurance
Automated Testing Integration
Pre-Build Testing
`json
{
"build": {
"production": {
"prebuildCommand": "npm run test && npm run lint"
}
}
}
`
Test Configuration
`bash
Package.json scripts
{
"scripts": {
"test": "jest",
"test:coverage": "jest --coverage",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"type-check": "tsc --noEmit"
}
}
`
Device Testing with EAS Build
Development Client Testing
`bash
Build development client
eas build --platform ios --profile development
Install on device for testing
Use Expo Go or custom development client
`
Internal Distribution
`bash
Build for internal testing
eas build --platform all --profile preview
Share with team via Expo Dashboard
Or download directly from build page
`
Quality Gates
Build Quality Checks
`yaml
GitHub Actions quality gates
- name: Quality Gates
run: |
npm run test:coverage
npm run lint
npm run type-check
npm run security-audit
`
Chapter 7: Production Deployment
Release Management
Version Management
`json
{
"expo": {
"version": "1.2.0",
"ios": {
"buildNumber": "12"
},
"android": {
"versionCode": 12
}
}
}
`
Automated Version Bumping
`bash
Using semantic versioning
npm version patch 1.0.0 -> 1.0.1
npm version minor 1.0.0 -> 1.1.0
npm version major 1.0.0 -> 2.0.0
Update app.json automatically
`
Production Deployment Strategy
Blue-Green Deployment
`yaml
Deploy to staging first
- name: Deploy to Staging
run: eas build --profile staging
Run integration tests
- name: Integration Tests
run: npm run test:integration
Deploy to production
- name: Deploy to Production
run: eas build --profile production
`
Rollback Strategy
`bash
Keep previous builds available
eas build:list --platform ios --status finished --limit 5
Quick rollback using EAS Update
eas update --branch production --message "Rollback to previous version"
`
Monitoring and Alerting
Build Monitoring
`yaml
Slack notifications
- name: Notify Slack
if: failure()
uses: 8398a7/action-slack@v3
with:
status: failure
text: "EAS Build failed for ${{ github.ref }}"
``
Production Monitoring
- Crash reporting: Sentry, Crashlytics
- Performance monitoring: Firebase Performance
- User analytics: Amplitude, Mixpanel
- App store metrics: App Store Connect, Google Play Console
Best Practices Summary
1. Use build profiles: Separate development, staging, and production
2. Automate testing: Run tests before builds
3. Secure credentials: Use EAS credential management
4. Monitor builds: Set up notifications and alerts
5. Plan rollbacks: Have a rollback strategy ready
6. Version consistently: Use semantic versioning
7. Test thoroughly: Use development clients and internal distribution
Conclusion
EAS Build and deployment workflows provide a robust foundation for professional mobile app development. By implementing proper CI/CD practices, automated testing, and monitoring, you can deliver high-quality apps with confidence.
Ready to deploy your app? Start with perfect icons using our [Icon Generator](/)!
Prerequisites
Required Tools
``bash
Install EAS CLI
npm install -g eas-cli
Login to your Expo account
eas login
Verify installation
eas --version
`
Project Requirements
- Expo SDK 41+ or bare React Native project
- Valid Expo account
- Git repository (recommended)
Initial Configuration
Initialize EAS in Your Project
`bash
Navigate to your project directory
cd your-expo-project
Initialize EAS
eas build:configure
This creates eas.json configuration file
`
Basic eas.json Structure
`json
{
"cli": {
"version": ">= 2.0.0"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"preview": {
"distribution": "internal"
},
"production": {}
},
"submit": {
"production": {}
}
}
`
Understanding Build Profiles
Development Profile
For development and testing:
`json
"development": {
"developmentClient": true,
"distribution": "internal",
"ios": {
"resourceClass": "m1-medium"
},
"android": {
"buildType": "developmentClient"
}
}
`
Preview Profile
For internal testing and QA:
`json
"preview": {
"distribution": "internal",
"ios": {
"simulator": true
},
"android": {
"buildType": "apk"
}
}
`
Production Profile
For app store releases:
`json
"production": {
"ios": {
"resourceClass": "m1-medium"
},
"android": {
"buildType": "app-bundle"
}
}
`
Chapter 3: Build Configuration
Advanced Configuration Options
Environment Variables
`json
{
"build": {
"production": {
"env": {
"API_URL": "https://api.production.com",
"ANALYTICS_KEY": "prod-key-123"
}
},
"staging": {
"env": {
"API_URL": "https://api.staging.com",
"ANALYTICS_KEY": "staging-key-456"
}
}
}
}
`
Custom Build Scripts
`json
{
"build": {
"production": {
"ios": {
"buildConfiguration": "Release"
},
"android": {
"gradleCommand": ":app:bundleRelease"
}
}
}
}
`
Platform-Specific Configuration
iOS Configuration
`json
{
"build": {
"production": {
"ios": {
"resourceClass": "m1-medium",
"scheme": "YourApp",
"buildConfiguration": "Release",
"enterpriseProvisioning": "universal",
"autoIncrement": "buildNumber"
}
}
}
}
`
Android Configuration
`json
{
"build": {
"production": {
"android": {
"resourceClass": "medium",
"buildType": "app-bundle",
"gradleCommand": ":app:bundleRelease",
"autoIncrement": "versionCode"
}
}
}
}
`
Credential Management
Automatic Credential Management
`bash
EAS handles credentials automatically
eas build --platform ios --profile production
For first-time setup, EAS will:
1. Generate certificates
2. Create provisioning profiles
3. Store securely in EAS servers
`
Manual Credential Management
`bash
View stored credentials
eas credentials
Configure specific credentials
eas credentials:configure
Sync local credentials
eas credentials:sync
`
Running Your First Build
Build Commands
`bash
Build for specific platform and profile
eas build --platform ios --profile production
eas build --platform android --profile production
Build for all platforms
eas build --profile production
Build with custom message
eas build --profile production --message "Release v1.2.0"
`
Monitoring Build Progress
- EAS CLI: Real-time progress in terminal
- Expo Dashboard: Web interface for build monitoring
- Email notifications: Build completion alerts
- Webhooks: Custom integrations
Chapter 4: EAS Submit
Setting Up App Store Submission
iOS App Store Configuration
`json
{
"submit": {
"production": {
"ios": {
"appleId": "your-apple-id@example.com",
"ascAppId": "1234567890",
"appleTeamId": "ABCD123456"
}
}
}
}
`
Google Play Store Configuration
`json
{
"submit": {
"production": {
"android": {
"serviceAccountKeyPath": "./google-service-account.json",
"track": "production"
}
}
}
}
`
Automated Submission Workflow
Complete Build and Submit Pipeline
`bash
Build and submit in one command
eas build --platform ios --profile production --auto-submit
Or submit existing build
eas submit --platform ios --profile production --id BUILD_ID
`
Submission Profiles
`json
{
"submit": {
"production": {
"ios": {
"appleId": "your-apple-id@example.com",
"ascAppId": "1234567890"
},
"android": {
"track": "production",
"releaseStatus": "completed"
}
},
"beta": {
"ios": {
"appleId": "your-apple-id@example.com",
"ascAppId": "1234567890"
},
"android": {
"track": "beta",
"releaseStatus": "completed"
}
}
}
}
`
Chapter 5: CI/CD Integration
GitHub Actions Integration
Basic Workflow Setup
`yaml
.github/workflows/eas-build.yml
name: EAS Build
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
name: Build and Submit
runs-on: ubuntu-latest
steps:
- name: Check for EXPO_TOKEN
run: |
if [ -z "${{ secrets.EXPO_TOKEN }}" ]; then
echo "You must provide an EXPO_TOKEN secret"
exit 1
fi
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: npm
- name: Setup EAS
uses: expo/expo-github-action@v8
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Install dependencies
run: npm ci
- name: Build on EAS
run: eas build --platform all --non-interactive
`
Advanced Workflow with Testing
`yaml
name: CI/CD Pipeline
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
cache: npm
- run: npm ci
- run: npm run test
- run: npm run lint
- run: npm run type-check
build:
name: EAS Build
needs: test
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
cache: npm
- uses: expo/expo-github-action@v8
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- run: npm ci
- run: eas build --platform all --non-interactive --profile production
submit:
name: Submit to Stores
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' && contains(github.event.head_commit.message, '[release]')
steps:
- uses: actions/checkout@v3
- uses: expo/expo-github-action@v8
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- run: eas submit --platform all --non-interactive --profile production
`
Environment-Based Deployments
Branch-Based Workflows
`yaml
Different profiles for different branches
- name: Build Development
if: github.ref == 'refs/heads/develop'
run: eas build --platform all --profile development
- name: Build Staging
if: github.ref == 'refs/heads/staging'
run: eas build --platform all --profile preview
- name: Build Production
if: github.ref == 'refs/heads/main'
run: eas build --platform all --profile production
`
Chapter 6: Testing and Quality Assurance
Automated Testing Integration
Pre-Build Testing
`json
{
"build": {
"production": {
"prebuildCommand": "npm run test && npm run lint"
}
}
}
`
Test Configuration
`bash
Package.json scripts
{
"scripts": {
"test": "jest",
"test:coverage": "jest --coverage",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"type-check": "tsc --noEmit"
}
}
`
Device Testing with EAS Build
Development Client Testing
`bash
Build development client
eas build --platform ios --profile development
Install on device for testing
Use Expo Go or custom development client
`
Internal Distribution
`bash
Build for internal testing
eas build --platform all --profile preview
Share with team via Expo Dashboard
Or download directly from build page
`
Quality Gates
Build Quality Checks
`yaml
GitHub Actions quality gates
- name: Quality Gates
run: |
npm run test:coverage
npm run lint
npm run type-check
npm run security-audit
`
Chapter 7: Production Deployment
Release Management
Version Management
`json
{
"expo": {
"version": "1.2.0",
"ios": {
"buildNumber": "12"
},
"android": {
"versionCode": 12
}
}
}
`
Automated Version Bumping
`bash
Using semantic versioning
npm version patch 1.0.0 -> 1.0.1
npm version minor 1.0.0 -> 1.1.0
npm version major 1.0.0 -> 2.0.0
Update app.json automatically
`
Production Deployment Strategy
Blue-Green Deployment
`yaml
Deploy to staging first
- name: Deploy to Staging
run: eas build --profile staging
Run integration tests
- name: Integration Tests
run: npm run test:integration
Deploy to production
- name: Deploy to Production
run: eas build --profile production
`
Rollback Strategy
`bash
Keep previous builds available
eas build:list --platform ios --status finished --limit 5
Quick rollback using EAS Update
eas update --branch production --message "Rollback to previous version"
`
Monitoring and Alerting
Build Monitoring
`yaml
Slack notifications
- name: Notify Slack
if: failure()
uses: 8398a7/action-slack@v3
with:
status: failure
text: "EAS Build failed for ${{ github.ref }}"
``
Production Monitoring
- Crash reporting: Sentry, Crashlytics
- Performance monitoring: Firebase Performance
- User analytics: Amplitude, Mixpanel
- App store metrics: App Store Connect, Google Play Console
Best Practices Summary
1. Use build profiles: Separate development, staging, and production
2. Automate testing: Run tests before builds
3. Secure credentials: Use EAS credential management
4. Monitor builds: Set up notifications and alerts
5. Plan rollbacks: Have a rollback strategy ready
6. Version consistently: Use semantic versioning
7. Test thoroughly: Use development clients and internal distribution
Conclusion
EAS Build and deployment workflows provide a robust foundation for professional mobile app development. By implementing proper CI/CD practices, automated testing, and monitoring, you can deliver high-quality apps with confidence.
Ready to deploy your app? Start with perfect icons using our [Icon Generator](/)!
``
bash
Install EAS CLI
npm install -g eas-cli
Login to your Expo account
eas login
Verify installation
eas --version
`
Project Requirements
- Expo SDK 41+ or bare React Native project
- Valid Expo account
- Git repository (recommended)
Initial Configuration
Initialize EAS in Your Project
`bash
Navigate to your project directory
cd your-expo-project
Initialize EAS
eas build:configure
This creates eas.json configuration file
`
Basic eas.json Structure
`json
{
"cli": {
"version": ">= 2.0.0"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"preview": {
"distribution": "internal"
},
"production": {}
},
"submit": {
"production": {}
}
}
`
Understanding Build Profiles
Development Profile
For development and testing:
`json
"development": {
"developmentClient": true,
"distribution": "internal",
"ios": {
"resourceClass": "m1-medium"
},
"android": {
"buildType": "developmentClient"
}
}
`
Preview Profile
For internal testing and QA:
`json
"preview": {
"distribution": "internal",
"ios": {
"simulator": true
},
"android": {
"buildType": "apk"
}
}
`
Production Profile
For app store releases:
`json
"production": {
"ios": {
"resourceClass": "m1-medium"
},
"android": {
"buildType": "app-bundle"
}
}
`
Chapter 3: Build Configuration
Advanced Configuration Options
Environment Variables
`json
{
"build": {
"production": {
"env": {
"API_URL": "https://api.production.com",
"ANALYTICS_KEY": "prod-key-123"
}
},
"staging": {
"env": {
"API_URL": "https://api.staging.com",
"ANALYTICS_KEY": "staging-key-456"
}
}
}
}
`
Custom Build Scripts
`json
{
"build": {
"production": {
"ios": {
"buildConfiguration": "Release"
},
"android": {
"gradleCommand": ":app:bundleRelease"
}
}
}
}
`
Platform-Specific Configuration
iOS Configuration
`json
{
"build": {
"production": {
"ios": {
"resourceClass": "m1-medium",
"scheme": "YourApp",
"buildConfiguration": "Release",
"enterpriseProvisioning": "universal",
"autoIncrement": "buildNumber"
}
}
}
}
`
Android Configuration
`json
{
"build": {
"production": {
"android": {
"resourceClass": "medium",
"buildType": "app-bundle",
"gradleCommand": ":app:bundleRelease",
"autoIncrement": "versionCode"
}
}
}
}
`
Credential Management
Automatic Credential Management
`bash
EAS handles credentials automatically
eas build --platform ios --profile production
For first-time setup, EAS will:
1. Generate certificates
2. Create provisioning profiles
3. Store securely in EAS servers
`
Manual Credential Management
`bash
View stored credentials
eas credentials
Configure specific credentials
eas credentials:configure
Sync local credentials
eas credentials:sync
`
Running Your First Build
Build Commands
`bash
Build for specific platform and profile
eas build --platform ios --profile production
eas build --platform android --profile production
Build for all platforms
eas build --profile production
Build with custom message
eas build --profile production --message "Release v1.2.0"
`
Monitoring Build Progress
- EAS CLI: Real-time progress in terminal
- Expo Dashboard: Web interface for build monitoring
- Email notifications: Build completion alerts
- Webhooks: Custom integrations
Chapter 4: EAS Submit
Setting Up App Store Submission
iOS App Store Configuration
`json
{
"submit": {
"production": {
"ios": {
"appleId": "your-apple-id@example.com",
"ascAppId": "1234567890",
"appleTeamId": "ABCD123456"
}
}
}
}
`
Google Play Store Configuration
`json
{
"submit": {
"production": {
"android": {
"serviceAccountKeyPath": "./google-service-account.json",
"track": "production"
}
}
}
}
`
Automated Submission Workflow
Complete Build and Submit Pipeline
`bash
Build and submit in one command
eas build --platform ios --profile production --auto-submit
Or submit existing build
eas submit --platform ios --profile production --id BUILD_ID
`
Submission Profiles
`json
{
"submit": {
"production": {
"ios": {
"appleId": "your-apple-id@example.com",
"ascAppId": "1234567890"
},
"android": {
"track": "production",
"releaseStatus": "completed"
}
},
"beta": {
"ios": {
"appleId": "your-apple-id@example.com",
"ascAppId": "1234567890"
},
"android": {
"track": "beta",
"releaseStatus": "completed"
}
}
}
}
`
Chapter 5: CI/CD Integration
GitHub Actions Integration
Basic Workflow Setup
`yaml
.github/workflows/eas-build.yml
name: EAS Build
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
name: Build and Submit
runs-on: ubuntu-latest
steps:
- name: Check for EXPO_TOKEN
run: |
if [ -z "${{ secrets.EXPO_TOKEN }}" ]; then
echo "You must provide an EXPO_TOKEN secret"
exit 1
fi
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: npm
- name: Setup EAS
uses: expo/expo-github-action@v8
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Install dependencies
run: npm ci
- name: Build on EAS
run: eas build --platform all --non-interactive
`
Advanced Workflow with Testing
`yaml
name: CI/CD Pipeline
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
cache: npm
- run: npm ci
- run: npm run test
- run: npm run lint
- run: npm run type-check
build:
name: EAS Build
needs: test
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
cache: npm
- uses: expo/expo-github-action@v8
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- run: npm ci
- run: eas build --platform all --non-interactive --profile production
submit:
name: Submit to Stores
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' && contains(github.event.head_commit.message, '[release]')
steps:
- uses: actions/checkout@v3
- uses: expo/expo-github-action@v8
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- run: eas submit --platform all --non-interactive --profile production
`
Environment-Based Deployments
Branch-Based Workflows
`yaml
Different profiles for different branches
- name: Build Development
if: github.ref == 'refs/heads/develop'
run: eas build --platform all --profile development
- name: Build Staging
if: github.ref == 'refs/heads/staging'
run: eas build --platform all --profile preview
- name: Build Production
if: github.ref == 'refs/heads/main'
run: eas build --platform all --profile production
`
Chapter 6: Testing and Quality Assurance
Automated Testing Integration
Pre-Build Testing
`json
{
"build": {
"production": {
"prebuildCommand": "npm run test && npm run lint"
}
}
}
`
Test Configuration
`bash
Package.json scripts
{
"scripts": {
"test": "jest",
"test:coverage": "jest --coverage",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"type-check": "tsc --noEmit"
}
}
`
Device Testing with EAS Build
Development Client Testing
`bash
Build development client
eas build --platform ios --profile development
Install on device for testing
Use Expo Go or custom development client
`
Internal Distribution
`bash
Build for internal testing
eas build --platform all --profile preview
Share with team via Expo Dashboard
Or download directly from build page
`
Quality Gates
Build Quality Checks
`yaml
GitHub Actions quality gates
- name: Quality Gates
run: |
npm run test:coverage
npm run lint
npm run type-check
npm run security-audit
`
Chapter 7: Production Deployment
Release Management
Version Management
`json
{
"expo": {
"version": "1.2.0",
"ios": {
"buildNumber": "12"
},
"android": {
"versionCode": 12
}
}
}
`
Automated Version Bumping
`bash
Using semantic versioning
npm version patch 1.0.0 -> 1.0.1
npm version minor 1.0.0 -> 1.1.0
npm version major 1.0.0 -> 2.0.0
Update app.json automatically
`
Production Deployment Strategy
Blue-Green Deployment
`yaml
Deploy to staging first
- name: Deploy to Staging
run: eas build --profile staging
Run integration tests
- name: Integration Tests
run: npm run test:integration
Deploy to production
- name: Deploy to Production
run: eas build --profile production
`
Rollback Strategy
`bash
Keep previous builds available
eas build:list --platform ios --status finished --limit 5
Quick rollback using EAS Update
eas update --branch production --message "Rollback to previous version"
`
Monitoring and Alerting
Build Monitoring
`yaml
Slack notifications
- name: Notify Slack
if: failure()
uses: 8398a7/action-slack@v3
with:
status: failure
text: "EAS Build failed for ${{ github.ref }}"
``Production Monitoring
- Crash reporting: Sentry, Crashlytics
- Performance monitoring: Firebase Performance
- User analytics: Amplitude, Mixpanel
- App store metrics: App Store Connect, Google Play Console
Best Practices Summary
1. Use build profiles: Separate development, staging, and production
2. Automate testing: Run tests before builds
3. Secure credentials: Use EAS credential management
4. Monitor builds: Set up notifications and alerts
5. Plan rollbacks: Have a rollback strategy ready
6. Version consistently: Use semantic versioning
7. Test thoroughly: Use development clients and internal distribution
Conclusion
EAS Build and deployment workflows provide a robust foundation for professional mobile app development. By implementing proper CI/CD practices, automated testing, and monitoring, you can deliver high-quality apps with confidence.
Ready to deploy your app? Start with perfect icons using our [Icon Generator](/)!
1. Use build profiles: Separate development, staging, and production
2. Automate testing: Run tests before builds
3. Secure credentials: Use EAS credential management
4. Monitor builds: Set up notifications and alerts
5. Plan rollbacks: Have a rollback strategy ready
6. Version consistently: Use semantic versioning
7. Test thoroughly: Use development clients and internal distribution