# Publishing (/docs/updates/publishing)



```sh
npx liftbay update publish --channel production
```

The CLI runs `expo export` for each platform, resolves each platform's runtime version with `expo-updates`, uploads only files Liftbay doesn't have yet (files are stored once per project by content hash), and publishes.

For CodePush and hot-updater apps (`"updates": { "client": "codepush" }` or `"hot-updater"` in `liftbay.json`), it runs `react-native bundle` and compiles Hermes bytecode instead, in the layout each client loads, for the app version in the native project (`--target-version` for a range).

The bundle is built with the variables of the channel's [environment](/docs/environments) (`production` for the production channel), the same ones its builds use, so `EXPO_PUBLIC_*` values match the installed app. They take precedence over your local `.env` files. Secret variables stay in Liftbay: a JavaScript bundle shouldn't contain them.

## Options [#options]

| Option                           | Meaning                                                                                          |
| -------------------------------- | ------------------------------------------------------------------------------------------------ |
| `--channel <name>`               | Channel to publish to (default `production`)                                                     |
| `--profile <name>`               | Use the channel of this build profile instead                                                    |
| `--platform <ios\|android\|all>` | Platforms to publish (default `all`)                                                             |
| `-m, --message <text>`           | Release message (default: the last commit message)                                               |
| `--rollout <percent>`            | Start with a partial rollout                                                                     |
| `--mandatory`                    | Apply immediately instead of on the next launch                                                  |
| `--private-key <file>`           | Sign with this update signing key (see [Signed updates](/docs/updates/signing))                  |
| `--target-version <range>`       | CodePush and hot-updater: binary versions that get it, e.g. `1.5.x` (default: the app's version) |
| `--runtime-version <value>`      | hot-updater `fingerprint` strategy: the fingerprint the update is for                            |

The git branch and commit are recorded with the release.

## Runtime versions [#runtime-versions]

If iOS and Android resolve to different runtime versions, the CLI publishes one release per runtime version.

## Signing [#signing]

When an update signing key is found (`--private-key`, `LIFTBAY_UPDATE_PRIVATE_KEY`, or `keys/liftbay-private-key.pem`), the update is signed on your machine before it goes live. Channels set to **signed updates only** refuse unsigned publishes. See [Signed updates](/docs/updates/signing).

## Plan limits [#plan-limits]

The Free plan includes 20 publishes a month. Each platform in a publish counts once (iOS and Android uses two); rollbacks and rollout changes never count. Past the limit, 4 emergency publishes go through with an upgrade prompt so a hotfix is never blocked. Indie publishes without limits. See [Early bird and limits](/docs/pricing).
