Skip to main content

๐Ÿ“ฑ EAS Workflows Integration Guide (LEGACY)

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.

Why EAS Workflows?

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.yml
  • deploy-alpha.yml
  • deploy-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โ€‹

ScenarioWithout EAS WorkflowsWith EAS Workflows
JS-only changesOTA Update: 2-5 minRepack: 2-5 min (same speed)
Native changesFull Build: 15-30 minFull Build: 15-30 min (same)
Find existing buildManual scriptAutomatic โœ…
Fingerprint generationManual implementationBuilt-in โœ…
TestFlight submissionCustom scriptPre-packaged โœ…
E2E TestingCustom setupMaestro built-in โœ…

๐Ÿ”ง Configurationโ€‹

Required GitHub Secretsโ€‹

SecretPurposeRequired
EXPO_TOKENEAS authenticationโœ… Yes
EXPO_ACCOUNTYour Expo account slugโœ… Yes
SLACK_WEBHOOK_URLSlack notificationsโŒ Optional
GITHUB_TOKENPR creationโœ… Auto-provided

Getting Your EXPO_TOKENโ€‹

  1. Visit: https://expo.dev/accounts/[your-account]/settings/access-tokens
  2. Click "Create token"
  3. Name: github-actions-mobile
  4. Scopes: Select all
  5. 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โ€‹

  1. Go to GitHub โ†’ Actions โ†’ "Mobile Multi-Stage Deploy (EAS Workflows)"
  2. Click "Run workflow"
  3. Choose:
    • target_stage: beta / alpha / production
    • force_build: true (skip fingerprint check)

๐Ÿ“Š Monitoring & Observabilityโ€‹

Where to Monitorโ€‹

  1. GitHub Actions: https://github.com/[org]/attunelogic-mobile/actions

    • PR creation and orchestration
    • Version bumping
    • Git operations
  2. 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
  3. 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:

  1. โœ… Verify EXPO_TOKEN secret is set
  2. โœ… Check EAS CLI is latest version
  3. โœ… Ensure .eas/workflows/ files exist
  4. โœ… Check EAS dashboard for errors

Fingerprint Mismatchโ€‹

Symptom: "No compatible build found" even for JS changes

Solutions:

  1. โœ… Check if native dependencies changed
  2. โœ… Verify app.config.js hasn't changed
  3. โœ… Force new build with [build] flag
  4. โœ… Check EAS build logs for fingerprint details

Repack Failingโ€‹

Symptom: Repack job fails with error

Solutions:

  1. โœ… Ensure original build completed successfully
  2. โœ… Verify runtime version hasn't changed
  3. โœ… Check if build profile matches
  4. โœ… Try forcing a fresh build

TestFlight/Play Submission Failsโ€‹

Symptom: Submit job fails in EAS Workflow

Solutions:

  1. โœ… Verify Apple/Google credentials are configured
  2. โœ… Check App Store Connect / Play Console for errors
  3. โœ… Ensure build profile is store distribution
  4. โœ… 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


๐ŸŽ‰ 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! ๐Ÿš€