EAS Build: how to include non-Git (private) files, eg google-services.json

As I understand, eas build -p android uses Git (rather than the current folder) to push the files for building. I have android/app/google-services.json git-ignored as it’s sensitive. Build failed while it was git-ignored, I created a branch to un-ignore it (which I’ll rebase to for each build) and build succeeds. This workflow is fine for now. I’m wondering though if there’s a way to use Secretes to include files? It doesn’t seem so, Secrets seems intended for plain-text values to be pulled into JS. If there’s no solution to what I’m after, call this a feature request: in the Secrets page, it would be nice to add files like:

  • Upload file
  • Path to upload as (eg android/app/google-services.json)

eas secrets it’s exactly what you need, it works pretty much the same as in every other ci service, if you need the file just restore from env in preinstall step, I recommend keeping it base64 encoded

e.g. echo "$SOME_ENV_VARIABLE" | base64 -d > google-service.json

1 Like