๐ฑ EAS Workflows Integration Guide (LEGACY)
This document describes an older EAS Workflows-based pipeline. The current pipeline is documented in deployment/mobile-deployment-guide.
๐ฏ Overviewโ
AttuneLogic Mobile uses a hybrid deployment strategy that combines:
- GitHub Actions for PR-based approval workflow
- EAS Workflows for optimized mobile build and deployment operations
This approach provides the best of both worlds: familiar PR approval flow with mobile-optimized build intelligence.
EAS Workflows provide automatic fingerprinting, intelligent repack optimization, and pre-packaged jobs specifically designed for React Native/Expo apps. This results in faster builds and simpler maintenance compared to custom scripts.
๐๏ธ Architectureโ
graph TD
A[GitHub: Push to Feature Branch] --> B[GitHub Actions: Build & Validate]
B --> C[GitHub Actions: Create PR to Beta]
C --> D[Review & Merge PR]
D --> E[GitHub Actions: Trigger EAS Workflow]
E --> F[EAS Workflow: deploy-beta.yml]
F --> G[EAS: Generate Fingerprint]
G --> H{Native Changes?}
H -->|No| I[EAS: Repack Existing Build 2-5min]
H -->|Yes| J[EAS: Build Native 15-30min]
I --> K[EAS: Publish OTA Update]
J --> K
K --> L[EAS: Send Slack Notification]
L --> M[GitHub Actions: Create PR to Alpha]
๐ Workflow Componentsโ
1. GitHub Actions (Orchestration)โ
Location: .github/workflows/mobile-deploy-eas.yml
Responsibilities:
- โ Run validation and tests
- โ Create and manage PRs
- โ Trigger EAS Workflows
- โ Handle version bumping
- โ Manage Git operations
2. EAS Workflows (Execution)โ
Location: .eas/workflows/
deploy-beta.ymldeploy-alpha.ymldeploy-production.yml
Responsibilities:
- โ Generate fingerprints (detect native changes)
- โ Check for existing compatible builds
- โ Repack or build based on changes
- โ Submit to TestFlight/Play Store
- โ Publish OTA updates
- โ Send notifications
๐ Pre-packaged Jobsโ
EAS Workflows come with built-in job types that we use:
fingerprint - Native Change Detectionโ
fingerprint:
type: fingerprint
params:
platform: all
Output: Generates hashes for iOS and Android native layers
get-build - Find Compatible Buildโ
android_get_build:
type: get-build
params:
fingerprint_hash: ${{ needs.fingerprint.outputs.android_fingerprint_hash }}
platform: android
Output: build_id if compatible build exists
repack - Fast JS Updateโ
android_repack:
type: repack
params:
build_id: ${{ needs.android_get_build.outputs.build_id }}
Time: 2-5 minutes (fast!)
Use Case: JS-only changes
build - Full Native Buildโ
android_build:
type: build
params:
platform: android
profile: beta
Time: 15-30 minutes
Use Case: Native changes required
update - OTA Deploymentโ
publish_update:
type: update
params:
branch: beta
message: 'Beta OTA update'
Time: < 1 minute
Use Case: Deploy JS changes to users
testflight - iOS TestFlight Submissionโ
ios_submit:
type: testflight
params:
build_id: ${{ needs.ios_build.outputs.build_id }}
Use Case: Submit iOS builds to TestFlight
submit - App Store/Play Store Submissionโ
android_submit:
type: submit
params:
build_id: ${{ needs.android_build.outputs.build_id }}
platform: android
track: internal
Use Case: Submit to App/Play Store
slack - Team Notificationsโ
notify:
type: slack
params:
webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}
message: 'Deployment complete!'
Use Case: Send deployment notifications
require-approval - Manual Gateโ
approval:
type: require-approval
params:
message: 'Please confirm production deployment'
Use Case: Production safety gate
๐ Deployment Flowโ
Beta Deploymentโ
1. Developer merges PR to beta
2. GitHub Actions: Trigger EAS Workflow
3. EAS Workflow (deploy-beta.yml):
โโ Generate fingerprint
โโ Check for existing builds
โโ Decision:
โ โโ Repack (if compatible build exists) ~2-5 min
โ โโ Build (if no compatible build) ~15-30 min
โโ Publish OTA update
โโ Send Slack notification
4. GitHub Actions: Create PR beta โ alpha
Alpha Deployment (TestFlight)โ
1. Merge PR to alpha
2. GitHub Actions: Trigger EAS Workflow
3. EAS Workflow (deploy-alpha.yml):
โโ Generate fingerprint
โโ Check for existing builds
โโ Repack or Build
โโ Submit iOS to TestFlight
โโ Submit Android to Play Internal
โโ Publish OTA update
โโ Send Slack notification
4. GitHub Actions: Create PR alpha โ main
Production Deploymentโ
1. Merge PR to main
2. GitHub Actions:
โโ Bump version (patch/minor/major)
โโ Trigger EAS Workflow
3. EAS Workflow (deploy-production.yml):
โโ Generate fingerprint
โโ Build fresh binaries (recommended)
โโ Submit iOS to App Store
โโ Submit Android to Play Store Production
โโ Publish OTA update
โโ Send Slack notification
โโ Require manual approval
4. GitHub Actions: Create sync PR main โ alpha
โก Performance Comparisonโ
| Scenario | Without EAS Workflows | With EAS Workflows |
|---|---|---|
| JS-only changes | OTA Update: 2-5 min | Repack: 2-5 min (same speed) |
| Native changes | Full Build: 15-30 min | Full Build: 15-30 min (same) |
| Find existing build | Manual script | Automatic โ |
| Fingerprint generation | Manual implementation | Built-in โ |
| TestFlight submission | Custom script | Pre-packaged โ |
| E2E Testing | Custom setup | Maestro built-in โ |
๐ง Configurationโ
Required GitHub Secretsโ
| Secret | Purpose | Required |
|---|---|---|
EXPO_TOKEN | EAS authentication | โ Yes |
EXPO_ACCOUNT | Your Expo account slug | โ Yes |
SLACK_WEBHOOK_URL | Slack notifications | โ Optional |
GITHUB_TOKEN | PR creation | โ Auto-provided |
Getting Your EXPO_TOKENโ
- Visit: https://expo.dev/accounts/[your-account]/settings/access-tokens
- Click "Create token"
- Name:
github-actions-mobile - Scopes: Select all
- Add to GitHub: Settings โ Secrets โ Actions โ New repository secret
Finding Your EXPO_ACCOUNTโ
Your account slug is in your Expo dashboard URL:
https://expo.dev/accounts/[your-account-slug]/projects/
^^^^^^^^^^^^^^^^^^^^
๐ File Structureโ
attunelogic-mobile/
โโโ .eas/
โ โโโ workflows/
โ โโโ deploy-beta.yml # Beta deployment workflow
โ โโโ deploy-alpha.yml # Alpha deployment workflow
โ โโโ deploy-production.yml # Production deployment workflow
โ
โโโ .github/
โ โโโ workflows/
โ โ โโโ mobile-deploy-eas.yml # GitHub Actions orchestration
โ โโโ actions/
โ โโโ create-pr/ # Reusable PR creation action
โ
โโโ eas.json # EAS build/submit configuration
๐ฎ Usage Examplesโ
Standard Deployment (Automatic)โ
# 1. Create feature and push
git checkout -b feature/new-screen
git add . && git commit -m "feat: add new job details screen"
git push origin feature/new-screen
# 2. GitHub Actions creates PR to beta
# 3. Review and merge PR
# 4. EAS Workflow automatically:
# - Generates fingerprint
# - Repacks existing build (fast!)
# - Publishes OTA update
# - Creates PR to alpha
Force Native Buildโ
# Add [build] flag to commit message
git commit -m "feat: add camera module [build]"
git push
# EAS Workflow will build fresh binaries instead of repack
Manual Workflow Dispatchโ
- Go to GitHub โ Actions โ "Mobile Multi-Stage Deploy (EAS Workflows)"
- Click "Run workflow"
- Choose:
target_stage: beta / alpha / productionforce_build: true (skip fingerprint check)
๐ Monitoring & Observabilityโ
Where to Monitorโ
-
GitHub Actions: https://github.com/[org]/attunelogic-mobile/actions
- PR creation and orchestration
- Version bumping
- Git operations
-
EAS Dashboard: https://expo.dev/accounts/[account]/projects/attunelogic-mobile
- Workflows: View EAS Workflow runs
- Builds: View all builds and their status
- Updates: View OTA updates and adoption
- Submissions: Track App/Play Store submissions
-
Slack: Real-time notifications (if configured)
Reading EAS Workflow Logsโ
1. Visit EAS Dashboard โ Workflows
2. Click on the workflow run
3. View each job's status:
โ
fingerprint: Completed in 30s
โ
android_get_build: Found build abc123
โ
android_repack: Completed in 2m 15s
โ
publish_update: Update published
โ
notify: Slack notification sent
๐ Troubleshootingโ
EAS Workflow Not Triggeringโ
Symptom: GitHub Actions completes but no EAS Workflow runs
Solutions:
- โ
Verify
EXPO_TOKENsecret is set - โ Check EAS CLI is latest version
- โ
Ensure
.eas/workflows/files exist - โ Check EAS dashboard for errors
Fingerprint Mismatchโ
Symptom: "No compatible build found" even for JS changes
Solutions:
- โ Check if native dependencies changed
- โ
Verify
app.config.jshasn't changed - โ
Force new build with
[build]flag - โ Check EAS build logs for fingerprint details
Repack Failingโ
Symptom: Repack job fails with error
Solutions:
- โ Ensure original build completed successfully
- โ Verify runtime version hasn't changed
- โ Check if build profile matches
- โ Try forcing a fresh build
TestFlight/Play Submission Failsโ
Symptom: Submit job fails in EAS Workflow
Solutions:
- โ Verify Apple/Google credentials are configured
- โ Check App Store Connect / Play Console for errors
- โ
Ensure build profile is
storedistribution - โ Check EAS submission logs for details
๐ Comparison: Before vs Afterโ
Before (Pure GitHub Actions)โ
deploy-beta:
steps:
# Manual fingerprint check
- name: Check native changes
run: |
# Custom bash script (~50 lines)
# Check ios/, android/, package.json, etc.
# Conditional build
- name: Build if needed
if: needs_build == 'true'
run: eas build --profile beta
# OTA update
- name: Push update
if: needs_build == 'false'
run: eas update --branch beta
Issues:
- โ Manual fingerprint logic (error-prone)
- โ No repack optimization
- โ Custom scripts to maintain
- โ More complex YAML
After (EAS Workflows)โ
# In GitHub Actions
deploy-beta:
steps:
- name: Trigger EAS Workflow
run: npx eas-cli workflow:run deploy-beta.yml
# In EAS Workflow
jobs:
fingerprint:
type: fingerprint
android_get_build:
type: get-build
android_repack:
type: repack
Benefits:
- โ Automatic fingerprinting
- โ Built-in repack optimization
- โ Pre-packaged jobs
- โ Simpler configuration
๐ฏ Best Practicesโ
1. Let EAS Workflows Handle Build Logicโ
# โ
Good: Let EAS decide
- name: Trigger workflow
run: npx eas-cli workflow:run deploy-beta.yml
# โ Avoid: Manual build decisions in GitHub Actions
- name: Manual check
run: |
if [ native_changes ]; then
eas build...
2. Use Fingerprinting for All Environmentsโ
# Always start with fingerprint job
fingerprint:
type: fingerprint
params:
platform: all
3. Prefer Repack Over Full Buildsโ
# Let EAS Workflow decide based on fingerprint
android_repack:
if: ${{ needs.android_get_build.outputs.build_id }}
type: repack
4. Monitor EAS Dashboard Regularlyโ
- Check workflow success rates
- Review build times
- Track OTA adoption
- Monitor submission status
5. Use [build] Flag Sparinglyโ
# Only for actual native changes
git commit -m "feat: add camera [build]"
# Not for every deployment
git commit -m "fix: button style" # No [build] needed
๐ Related Documentationโ
- Mobile Deployment Guide - Complete deployment process
- Mobile Quick Reference - Quick commands and workflows
- EAS Workflows Official Docs - Expo documentation
- EAS Build Documentation - Build configuration
- EAS Submit Documentation - App submission
๐ Summaryโ
The hybrid approach with EAS Workflows provides:
โ
GitHub PR approval flow (familiar workflow)
โ
Automatic fingerprinting (no manual scripts)
โ
Intelligent repack (2-5 min for JS changes)
โ
Pre-packaged jobs (less maintenance)
โ
Built-in TestFlight/Play submission (simplified)
โ
Better monitoring (expo.dev dashboard)
โ
Consistent with API/Service (same PR pattern)
โ
Mobile-optimized (designed for React Native/Expo)
This setup gives you production-ready mobile CI/CD that's both powerful and maintainable! ๐