# shipthis game ship: Build & Publish a Godot Game from the CLI

> Reference for shipthis game ship - build and publish your Godot game to the App Store and Google Play. Flags for follow mode, downloading APK/AAB/IPA, demo credentials and Godot version overrides.

Source: https://shipth.is/docs/reference/game/ship

## Description

The `shipthis game ship` command builds your Godot game in the cloud and publishes it to the **App Store** and **Google Play**.

It uploads your project, compiles it on the ShipThis build servers using the credentials you set up with [`shipthis game wizard`](https://shipth.is/docs/reference/game/wizard), and - unless you tell it not to - sends the finished build on to TestFlight or Google Play.

You do not need an Apple computer, Xcode or the Android SDK. If you are not ready to publish yet, `--skipPublish` gives you the build without sending it anywhere.

[What is a job?]
Each platform you build for creates a **job** - one build of your game, on one platform, on our cloud build servers.

You can watch a job while it runs, or come back to it later with [`shipthis game job`](https://shipth.is/docs/reference/game/job) or in the [ShipThis dashboard](https://shipth.is/dashboard).

## Examples

### Standard use

When run without any flags, the command will try to run the full build and publish pipelines for each of the platforms that you have configured.

```bash
shipthis game ship
```

When run like this, pressing **L** will show or hide the last few lines of the logs, pressing **B** will open the job log in your browser.

[![asciicast](https://asciinema.org/a/7e1jPMx5i69VyM6TynkeFU0dI.svg)](https://asciinema.org/a/7e1jPMx5i69VyM6TynkeFU0dI#shipthis-col80row24)

### Follow mode

When using ShipThis in a CI environment, it is most useful to use the `--follow` to collect the full output. This flag requires you to specify the `--platform` flag too.

```bash
shipthis game ship --platform android --follow
```

[![asciicast](https://asciinema.org/a/gKmZ0E1rJ4oiT9SyuSivXBZfY.svg)](https://asciinema.org/a/gKmZ0E1rJ4oiT9SyuSivXBZfY#shipthis-col80row24)

### Follow, do not publish, and then download APK

Use `--skipPublish` when you want the build but do not want it sent to TestFlight or Google Play, and `--downloadAPK` to save the APK to a file when the job finishes. Together with `--follow` this builds your game, keeps the logs on screen, and leaves you with something you can install on a device:

```bash
shipthis game ship --platform android --follow --skipPublish --downloadAPK game.apk
```

Use `--download` instead of `--downloadAPK` to save the **AAB** for Google Play, or the **IPA** on iOS.

On Android you can use `--download` and `--downloadAPK` together to save both the AAB and the APK:

```bash
shipthis game ship --platform android --skipPublish --download game.aab --downloadAPK game.apk
```

[![asciicast](https://asciinema.org/a/GNf0t8niOlrMDsgPKqmBcuqQh.svg)](https://asciinema.org/a/GNf0t8niOlrMDsgPKqmBcuqQh#shipthis-col80row24)

### Building with demo credentials

Adding the `--useDemoCredentials` flag builds the specified platform with ShipThis demo certificates, keystores and provisioning profiles instead of your own. This is useful to generate an asset which can be side-loaded onto your own device.

The flag implies `--skipPublish`. A build signed with demo credentials is never published to TestFlight or Google Play.

```bash
# To build for iOS with demo credentials
shipthis game ship --platform ios --follow --useDemoCredentials --download game.ipa

# To build for Android with demo credentials
shipthis game ship --platform android --follow --useDemoCredentials --downloadAPK game.apk
```

### Uploading a large game

Before your build starts, your game files are zipped up and uploaded. Which files end up in that zip is controlled by the `globs` in your **shipthis.json** - see [Controlling uploaded files](https://shipth.is/docs/guides/controlling-uploaded-files).

If the zip comes to **16MB or more**, ShipThis splits it up and sends the parts in parallel, which is a good deal faster than sending the whole thing in one go. Each part is sent on its own, so a dropped connection does not cost you the whole upload - the failed part is retried and the parts that already arrived stay where they are.

[note]
Zips under **16MB** are sent in a single request. Splitting a small zip into parts does not make it any faster.

If the parallel upload gives you trouble, `--skipMultipart` will send the whole zip in one request instead. It is slower, and the zip must be **5GB or less**:

```bash
shipthis game ship --platform android --skipMultipart
```

Add `--verbose` to watch the individual parts go up, including any that get retried.

### Overriding the Godot version

You can specify a different Godot version to use only for the current job. This can be helpful if you are upgrading your game to use a newer version of Godot.

```bash
shipthis game ship --platform android --follow --gameEngineVersion 4.5.1 --download game-4.5.1.aab
```

The CLI checks this version before it builds the zip, so a typo stops the command in a second.
See [Godot versioning](https://shipth.is/docs/guides/godot-versioning) for the versions ShipThis supports.

### Shipping to a different game

Use `--gameId` to ship the files in this directory to a different game. The flag overrides the game in **shipthis.json**. You can use the flag when there is no **shipthis.json**.

```bash
shipthis game ship --gameId 0c179fc4 --platform android
```

If **shipthis.json** names a different game, the CLI shows a warning. The `globs` in **shipthis.json** still control which files are uploaded.

## Help Output

```help
USAGE
  $ shipthis game ship [-g <value>] [--download <value> --platform android|ios] [--downloadAPK <value> ]
    [--follow ] [--skipMultipart] [--skipPublish] [--verbose] [--useDemoCredentials ]
    [--gameEngineVersion <value>] [--dryRun]

FLAGS
  -g, --gameId=<value>             The ID of the game
      --download=<value>           Download the build artifact to the specified file
      --downloadAPK=<value>        Download the APK artifact (if available) to the specified file. Can be used with
                                   --download
      --dryRun                     Dry run - lists the files that would be shipped without executing the build or
                                   publish steps
      --follow                     Follow the job logs in real-time (requires --platform)
      --gameEngineVersion=<value>  Override the specified game engine version for this build
      --platform=<option>          The platform to ship the game to. This can be "android" or "ios"
                                   <options: android|ios>
      --skipMultipart              Upload the zip in one request instead of several parts in parallel (slower, and
                                   limited to 5GB)
      --skipPublish                Skip the publish step
      --useDemoCredentials         Use demo credentials for this build (requires --platform, implies --skipPublish)
      --verbose                    Enable verbose logging

DESCRIPTION
  Builds and publishes your ShipThis game.

EXAMPLES
  $ shipthis game ship

  $ shipthis game ship --platform ios

  $ shipthis game ship --platform android --skipPublish

  $ shipthis game ship --platform android --download game.aab

  $ shipthis game ship --platform android --follow --downloadAPK game.apk

  $ shipthis game ship --platform ios --follow --verbose

  $ shipthis game ship --platform ios --useDemoCredentials --download game.ipa

  $ shipthis game ship --platform android --gameEngineVersion 4.5.1 --skipPublish

  $ shipthis game ship --platform android --dryRun

  $ shipthis game ship --gameId 0c179fc4 --platform android
```

## Common tasks

#### Build and publish everything you have configured

```bash
shipthis game ship
```

#### Build an APK you can sideload, with no Google account

```bash
shipthis game ship --platform android --useDemoCredentials --downloadAPK game.apk --follow
```

#### Build an AAB for Google Play

```bash
shipthis game ship --platform android --download game.aab
```

#### Build for iOS and watch the log

```bash
shipthis game ship --platform ios --follow --verbose
```

#### Build without publishing anything

```bash
shipthis game ship --platform android --skipPublish
```

#### See what would be uploaded, without building

```bash
shipthis game ship --dryRun
```

## FAQ

<details>
<summary>Will running `shipthis game ship` publish my game to the store?</summary>

If you have configured publishing for a platform, then yes - a successful build is
uploaded to TestFlight or Google Play at the end of the job.

If you do not want that, add `--skipPublish`. The build still runs and you can still
download the result, but nothing is sent to Apple or Google:

```bash
shipthis game ship --platform android --skipPublish --download game.aab
```

`--useDemoCredentials` also implies `--skipPublish`. A build signed with demo
credentials is never published.

</details>

<details>
<summary>Do I need an Apple Developer account or a Google Play account?</summary>

Not to get a build. Add `--useDemoCredentials` and ShipThis signs the build with its own
certificates, keystore and provisioning profile instead of yours. The flag requires
`--platform`, and it implies `--skipPublish` - a build signed with demo credentials is
never sent to TestFlight or Google Play.

#### Android

```bash
shipthis game ship --platform android --useDemoCredentials --downloadAPK game.apk --follow
```

#### iOS

```bash
shipthis game ship --platform ios --useDemoCredentials --download game.ipa --follow
```

If you want every build to use demo credentials without passing the flag each time, set it
on the game:

```bash
shipthis game details --useDemoCredentials true
```

You will need your own accounts when you want to publish - a
[Play Console Developer account](https://play.google.com/apps/publish/signup) for Google
Play, an [Apple Developer account](https://developer.apple.com) for the App Store. Run the
[wizard command](https://shipth.is/docs/reference/game/wizard) at that point and it will set the
credentials up for you.

</details>

<details>
<summary>Do I need a Mac to build for iOS?</summary>

No. Your game is compiled on the ShipThis cloud build servers, so you do not need an Apple
computer, and you do not need Xcode or the Android SDK installed either. The CLI itself
runs on Windows, macOS and Linux - there is even a guide to
[building for iOS from an Android device](https://shipth.is/docs/tutorials/godot-ios-from-android) using
Termux.

You will still need an [Apple Developer account](https://developer.apple.com) to publish
to the App Store, because that is Apple's requirement rather than ours. To get an IPA
without one, see the question above.

</details>

<details>
<summary>What files does ShipThis upload from my machine?</summary>

The files selected by the `globs` values in your **shipthis.json** file. To see the list
without starting a build, use `--dryRun`:

```bash
shipthis game ship --dryRun
```

If the list is not what you expected, see
[Controlling uploaded files](https://shipth.is/docs/guides/controlling-uploaded-files) for how to change
it. For what happens to those files once they reach us - where they are stored, who can
read them, and how long they are kept - see
[How your code is handled](https://shipth.is/docs/guides/code-handling).

</details>

<details>
<summary>Which version of Godot will my game be built with?</summary>

ShipThis reads your **project.godot** file and detects the **Major.Minor** version you
used, for example **4.2**. It then builds with the latest stable patch release of that
version.

To see what it has picked, run [`shipthis game details`](https://shipth.is/docs/reference/game/details) and
look at **Game Engine Version**:

```bash
shipthis game details
```

To use a different version for a single build - handy when you are testing an upgrade:

```bash
shipthis game ship --platform android --gameEngineVersion 4.5.1 --follow
```

The version is checked before your files are zipped, so a typo stops the command in a
second rather than failing a build minutes later.

To pin a version for every build, set it on the game instead:

```bash
shipthis game details --gameEngineVersion 4.5.1 --force
```

See [Godot versioning](https://shipth.is/docs/guides/godot-versioning) for the versions we support.

</details>

<details>
<summary>What is the difference between `game ship` and `game build`?</summary>

[`shipthis game ship`](https://shipth.is/docs/reference/game/ship) starts a new job - it compiles your
game. [`shipthis game build`](https://shipth.is/docs/reference/game/build) lists and downloads the
**APK**, **AAB** and **IPA** files that previous jobs have already produced.

So you run `game ship` to make a build, and `game build` to fetch one you made earlier.

</details>

<details>
<summary>My build failed - how do I find out why?</summary>

Run it again with `--follow` to watch the logs as they happen:

```bash
shipthis game ship --platform android --follow
```

Add `--verbose` for more detail - this enables detailed logging locally and on the build
server, including running the Godot export with verbose output:

```bash
shipthis game ship --platform android --follow --verbose
```

To pull the full logs for a job that has already finished, use
[`shipthis game job logs`](https://shipth.is/docs/reference/game/job#game-job-logs):

```bash
shipthis game job logs 4d32239e
```

You can also review any job at any time in the [dashboard](https://shipth.is/dashboard) under the "Jobs"
tab.

If none of that explains it, the [Troubleshooting guide](https://shipth.is/docs/troubleshooting) covers the
common failures, and we can help you directly in our
[Discord](https://discord.gg/gPjn3S99k4).

</details>

<details>
<summary>Does shipping change my version number?</summary>

It changes the **Build Number**. ShipThis increments it automatically after each
successful build, so you do not have to remember to.

The **Semantic Version** is yours to manage - ShipThis will NOT change it. To bump it:

```bash
shipthis game details --semanticVersion 1.1.0
```

Both values are shown by [`shipthis game details`](https://shipth.is/docs/reference/game/details). See
[Game versioning](https://shipth.is/docs/guides/versioning) for what each number is for, and what the
stores expect of them.

</details>

<details>
<summary>My upload is slow, or it keeps failing</summary>

If your zip comes to **16MB or more**, ShipThis splits it up and uploads the parts in
parallel. Each part is sent on its own, so a dropped connection does not cost you the
whole upload - the failed part is retried and the parts that already arrived stay where
they are.

If the parallel upload is giving you trouble, send the whole zip in one request instead:

```bash
shipthis game ship --platform android --skipMultipart
```

It is slower, and the zip must be under **5GB**. Add `--verbose` to watch the parts go up,
including any that get retried.

If the upload is simply larger than it needs to be, check what is going into it:

```bash
shipthis game ship --dryRun
```

Leaving out previous exports, build folders and raw source assets can make a big
difference - see [Controlling uploaded files](https://shipth.is/docs/guides/controlling-uploaded-files).

</details>

## Related

- [`game wizard`](https://shipth.is/docs/reference/game/wizard) - set up credentials for a platform
- [`game create`](https://shipth.is/docs/reference/game/create) - register a new game with ShipThis
- [`game job`](https://shipth.is/docs/reference/game/job) - watch a running job, or read its logs
- [`game build`](https://shipth.is/docs/reference/game/build) - list and download finished builds
- [`game details`](https://shipth.is/docs/reference/game/details) - view and set the game's version, engine and IDs
- [Controlling uploaded files](https://shipth.is/docs/guides/controlling-uploaded-files) - choose which files are sent
- [How your code is handled](https://shipth.is/docs/guides/code-handling) - storage, access and retention
- [Godot versioning](https://shipth.is/docs/guides/godot-versioning) - the Godot versions we build with
- [Troubleshooting](https://shipth.is/docs/troubleshooting) - common failures and how to check them

## What's next?

If you have not set up a platform yet, the [quick start](https://shipth.is/docs/guides/quick-start) takes
you from installing the CLI to a published game in about five minutes. If something is not
behaving, come and find us in [Discord](https://discord.gg/gPjn3S99k4).
