# Store submission (/docs/builds/submit)



Liftbay uploads successful **store** builds for you: iOS to TestFlight, Android to a Google Play track. Uploads run on Liftbay's servers from the build's artifact, so nothing extra runs on your CI.

## Submit [#submit]

<Tabs items="[&#x22;After a build&#x22;, &#x22;An existing build&#x22;, &#x22;Every build of a profile&#x22;]">
  <Tab value="After a build">
    ```sh
    npx liftbay build --profile production --submit
    npx liftbay build --platform android --submit --track beta
    ```

    The submission is queued as soon as the build succeeds.
  </Tab>

  <Tab value="An existing build">
    ```sh
    npx liftbay submit                       # newest successful store build of each platform
    npx liftbay submit --build 42
    npx liftbay submit --platform android --track production --rollout 10
    ```

    Or open a build in the dashboard and click **Submit to store**.
  </Tab>

  <Tab value="Every build of a profile">
    ```json title="liftbay.json"
    "production": { "environment": "production", "channel": "production", "distribution": "store",
                    "platforms": ["ios", "android"], "submit": true, "submitTrack": "internal" }
    ```
  </Tab>
</Tabs>

`liftbay submit` follows the upload until the store confirms it; `--no-wait` returns right away. Every submission, with its progress log, is under **Submissions** in the dashboard.

## TestFlight [#testflight]

iOS builds are uploaded with your team's App Store Connect key, the one `liftbay credentials ios` sets up, through App Store Connect's build upload API. Apple then processes the build; Liftbay waits until processing is complete or Apple reports errors, and shows them.

Before the first upload, create the app in App Store Connect (**My Apps → New App**) with the project's bundle identifier. Each upload needs a new build number.

## Google Play [#google-play]

Android app bundles are uploaded with a **service account** of your Google Cloud project:

<Steps>
  <Step>
    In Google Cloud, create a service account and a JSON key for it.
  </Step>

  <Step>
    In Play Console, open **Users and permissions**, invite the service account's email and give it the **Release** permission for your app.
  </Step>

  <Step>
    Add the key to the project (or upload it under **Submissions** in the dashboard):

    ```sh
    npx liftbay credentials android --play-key ~/Downloads/play-key.json
    ```

    Liftbay checks the key against the project's Android package before saving it, encrypted.
  </Step>
</Steps>

| Track                | Play Console name |
| -------------------- | ----------------- |
| `internal` (default) | Internal testing  |
| `alpha`              | Closed testing    |
| `beta`               | Open testing      |
| `production`         | Production        |

`--rollout 10` releases to 10% of the track's users; widen it in Play Console. Until your app's first release is published, Play only accepts draft releases, so Liftbay creates a draft and you send it for review in Play Console.

The first upload of a new app must be done in Play Console by hand; after that Liftbay can upload every build.

## Retries [#retries]

Network errors and store outages are retried with increasing waits, up to 5 attempts. Problems you need to fix, such as a missing app, a reused build number or missing permissions, fail the submission straight away with the store's message.
