EAS Submit does not take ENV VARs (like APP_VARIANT) from profile or eas.json environment
- Dominant language
- TypeScript
- Stars
- 1.4k
- Forks
- 236
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 91
Description
### Build/Submit details page URL
_No response_
### Summary
When running `eas submit --profile production`, and having `eas.json` configured with:
```json
"production": {
"autoIncrement": true,
"channel": "production",
"environment": "production"
}
```
The command does not take environtment variables configured in the `production` environment.
For example:
I use `process.env.APP_VARIANT` in my `app.config.ts` to determine the bundle identifier, and default to `development` if the env var is not set. I've noticed in `eas submit` that the env var is not set, to it submits with my dev bundle identifier.
I think it should work for `eas submit` in the same way it works for `eas build` according to https://docs.expo.dev/eas/environment-variables/
### Managed or bare?
Managed
### Environment
```
bunx expo-doctor
env: load .env.local
env: export APP_VARIANT EXPO_PUBLIC_SENTRY_DSN SENTRY_AUTH_TOKEN
15/15 checks passed. No issues detected!
```
### Error output
_No response_
### Reproducible demo or steps to reproduce from a blank project
1. Set up the `APP_VARIANT` environment variable in EAS for the production environment
2. Configure the production profile in `eas.json` to use the production environment
3. Determine the bundle identifier in `app.config.ts` to be based on `process.env.APP_VARIANT`
4. Run eas submit --profile production
5. Observe that the `APP_VARIANT` environment variable is not set
Contributor guide
Assessment
This issue has not been assessed yet.