# EAS Update

[← Back to Expo](https://dotenvx.com/docs/expo.md#production)

Complete [EAS Update setup](https://docs.expo.dev/eas-update/getting-started/) and install a build configured for the production channel and a compatible runtime version.

## Export with Dotenvx

On a machine with access to the production private key, create a fresh export using the script from the main guide:

**npm**

```console
$ npm run export
```

**pnpm**

```console
$ pnpm export
```

This decrypts .env.production before Expo bundles the public variables into dist. EAS variables with Secret visibility cannot be downloaded to your local machine; use your local .env.keys or provision DOTENV_PRIVATE_KEY_PRODUCTION in your CI secret store.

## Publish the exported bundle

Use --skip-bundler to publish the export you just created:

**npm**

```console
$ npx eas-cli@latest update --channel production --environment production --skip-bundler --input-dir dist --message "Update production"
```

**pnpm**

```console
$ pnpm dlx eas-cli@latest update --channel production --environment production --skip-bundler --input-dir dist --message "Update production"
```

The environment flag selects the EAS environment; it does not replace values already embedded in this exported bundle. Keep the export's app configuration consistent with the installed build.

Re-export before every update after changing configuration. Never publish .env.keys or encrypted .env files as app assets. See the [EAS CLI reference](https://docs.expo.dev/eas/cli/#eas-update) for publishing options.
