DEV Community

Cover image for Don't Pay for EAS! How to Set Up an EAS Local Build on GitHub Actions

Don't Pay for EAS! How to Set Up an EAS Local Build on GitHub Actions

Rodrigo Gomez Palacio on February 14, 2024

You're out of credits! Should you pay for EAS? If you're a React Native developer using Expo, you might be familiar with the convenience of Expo ...
Collapse
 
snanthagopal profile image
Nandagopalan • Edited

Hi, Thanks for the nice info. I have a small query

name: 🚢 Submit
if: ${{ github.event.inputs.should_submit }}
run: eas submit -p ${{ github.event.inputs.platform }} --profile ${{ github.event.inputs.profile }} --path app-build

Can you please let me know this step will upload the generated build to EAS cloud or App Store ?

because I want to upload the builds to EAS and share it to our team testers for testing. once all the testing completed I will submit the builds to App Store/ play store from EAS

Collapse
 
rgomezp profile image
Rodrigo Gomez Palacio

It will submit to the app stores via EAS

Collapse
 
arafat_alim profile image
ARAFAT AMAN ALIM

Could you please provide your Git Repo for this demo? I just wanted to see your android directory, eas.json file ?

Collapse
 
rgomezp profile image
Rodrigo Gomez Palacio

Hey there, it's a private repo, but here's the eas.json

{
  "build": {
    "development": {
      "developmentClient": true,
      "distribution": "internal",
      "android": {
        "buildType": "apk"
      },
      "env": {
        "NODE_ENV": "development",
        "FIREBASE_APP_CHECK_DEBUG_TOKEN": "<redacted>"
      }
    },
    "development-simulator": {
      "developmentClient": true,
      "distribution": "internal",
      "ios": {
        "simulator": true
      },
      "env": { "NODE_ENV": "development" }
    },
    "preview": {
      "developmentClient": false,
      "distribution": "internal",
      "android": {
        "buildType": "app-bundle"
      }
    },
    "production": {
      "ios": {
        "image": "latest"
      }
    }
  },
  "submit": {
    "production": {
      "android": {
        "track": "production",
        "serviceAccountKeyPath": "./googleServices/google-play-submitter.json"
      },
      "ios": {
        "appleId": "<redacted>",
        "ascAppId": "<redacted>"
      }
    },
    "preview": {
      "android": {
        "track": "internal",
        "serviceAccountKeyPath": "./googleServices/google-play-submitter.json"
      }
    }
  },
  "cli": {
    "promptToConfigurePushNotifications": false
  }
}
Enter fullscreen mode Exit fullscreen mode
Collapse
 
imtiajbinaoual profile image
Imtiaj Aoual

Hi, getting an error on the android build.
Android Gradle plugin requires Java 17 to run. You are currently using Java 11.
Any suggestions on how to fix this?

Collapse
 
soyoka profile image
Soyoka

just add

this line after the yarn install

- name: Setup Java 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'

Collapse
 
omardiaa48 profile image
Omar Elwakeel

I keep getting base64: invalid input what could be the problem?

Collapse
 
omardiaa48 profile image
Omar Elwakeel

Never mind, I figured it out, for multi line base64 input it's prefered to use the following echo $GOOGLE_SERVICES_JSON_BASE64 | base64 -di >./google-services.json, not di instead of --decode or d

Collapse
 
martydevs profile image
Andre Marti

Thanks for this awesome article, i'm learning the expo platform so this resource is kinda gold mine.

Greetings from México 🤟

Collapse
 
rgomezp profile image
Rodrigo Gomez Palacio

My pleasure Andre. Greetings also from Mexico!

Collapse
 
naguibihab profile image
Naguib Ihab

Great article Rodrigo, do you have any articles about running local builds as well?

Collapse
 
rgomezp profile image
Rodrigo Gomez Palacio

Thanks Naguib. I don't.

Are you referring to running Expo builds locally or the GitHub Action locally?