Skip to main content
Version: v4 (current)

Build Command

The standalone Orchestrator build command is a narrow shortcut for running a standard Orchestrator-managed build through a remote provider. It exists on the @game-ci/orchestrator CLI, not on the public GameCI CLI from game-ci/cli.

For normal user-facing local builds, tests, and custom Unity methods, use the public game-ci build and game-ci test commands. For general provider-backed jobs from the public CLI, use game-ci orchestrate.

Use standalone game-ci build only when you intentionally installed Orchestrator directly and want a short command for a standard remote build. Use game-ci orchestrate when you need local-docker, local-system, custom jobs, hooks, cache helpers, or deeper provider debugging.

game-ci build [options]

Required Options​

FlagDescription
--target-platformBuild target platform (e.g. StandaloneLinux64)

Project Options​

FlagDefaultDescription
--unity-versionautoUnity Editor version to use. Set to auto to detect from ProjectSettings/ProjectVersion.txt.
--project-path.Path to the Unity project directory
--build-name(empty)Name of the build output file (no file extension)
--builds-pathbuildOutput directory for build artifacts
--build-method(empty)Custom static C# build method to invoke (e.g. MyBuild.PerformBuild)
--build-profile(empty)Path to the build profile to activate, relative to the project root
--custom-parameters(empty)Additional parameters appended to the Unity command line

Versioning Options​

FlagDefaultDescription
--versioningSemanticVersioning strategy: Semantic, Tag, Custom, None
--version(empty)Explicit version string (used with --versioning Custom)

Unity Options​

FlagDefaultDescription
--manual-exitfalseSuppresses the -quit flag. Use when your build method calls EditorApplication.Exit(0) manually.
--enable-gpufalseLaunches Unity without specifying -nographics
--skip-activationfalseSkip Unity license activation/deactivation
--unity-licensing-server(empty)Unity floating license server address

Engine Options​

FlagDefaultDescription
--engineunityGame engine name (unity, godot, unreal, etc.)
--engine-plugin(empty)Engine provider plugin source for custom or overridden engine behavior. See Engine Plugins.

Non-Unity Engine Example​

game-ci build \
--engine godot \
--target-platform linux \
--custom-image my-godot-image:4.2 \
--provider-strategy aws

Add --engine-plugin when the engine is not covered by a built-in configuration or when you want to override the default engine behavior.

Custom Build Parameters​

Pass arbitrary parameters to the Unity build process:

game-ci build \
--target-platform StandaloneLinux64 \
--custom-parameters "-myFlag -myKey myValue"

The --custom-parameters string is appended to the Unity command line arguments.

Android Options​

FlagDefaultDescription
--android-version-code(empty)Android versionCode override
--android-export-typeandroidPackageExport type: androidPackage (APK), androidAppBundle (AAB), or androidStudioProject
--android-keystore-name(empty)Filename of the keystore
--android-keystore-base64(empty)Base64-encoded keystore file contents
--android-keystore-pass(empty)Keystore password
--android-keyalias-name(empty)Key alias name within the keystore
--android-keyalias-pass(empty)Key alias password
--android-target-sdk-version(empty)Target Android SDK version (e.g. AndroidApiLevel31)
--android-symbol-typenoneAndroid symbol type to export: none, public, or debugging

Android Build Example​

game-ci build \
--target-platform Android \
--android-keystore-base64 "$(base64 -w 0 release.keystore)" \
--android-keystore-pass "$KEYSTORE_PASS" \
--android-keyalias-name "release" \
--android-keyalias-pass "$KEY_PASS" \
--android-target-sdk-version AndroidApiLevel31 \
--android-export-type androidAppBundle

Docker Options​

Control the Docker container used for the build:

FlagDefaultDescription
--custom-image(empty)Override the Docker image (defaults to unityci/editor with the detected version and platform)
--docker-cpu-limit(empty)CPU limit for the container (e.g. 4 for 4 cores)
--docker-memory-limit(empty)Memory limit for the container (e.g. 8g for 8 GB)
--docker-workspace-path/github/workspacePath where the workspace is mounted inside the container
--run-as-host-userfalseRun as a user that matches the host system
--chown-files-to(empty)User and optionally group to give ownership of build artifacts (e.g. 1000:1000)

Custom Docker Image Example​

game-ci build \
--target-platform StandaloneLinux64 \
--custom-image my-registry.com/unity-editor:2022.3.56f1-linux

Authentication Options​

FlagDefaultDescription
--ssh-agent(empty)SSH Agent path to forward to the container
--git-private-token(empty)GitHub private token for pulling from private repositories

Provider Strategy​

The build command must run through an Orchestrator provider. Although the flag default is local internally, standalone local builds are not handled here; the command will ask you to use unity-builder or the public CLI for local execution.

FlagDefaultDescription
--provider-strategylocalSet to a remote strategy such as aws or k8s.

For local Docker or host execution through Orchestrator, use game-ci orchestrate --provider-strategy local-docker or game-ci orchestrate --provider-strategy local-system instead.

Output​

Build artifacts are written to the path specified by --builds-path (default build/). The directory structure is:

build/
<target-platform>/
<build-name>

Full Example​

game-ci build \
--target-platform StandaloneLinux64 \
--unity-version 2022.3.56f1 \
--project-path ./my-project \
--build-name MyGame \
--builds-path ./dist \
--versioning Semantic \
--custom-parameters "-enableAnalytics" \
--docker-cpu-limit 4 \
--docker-memory-limit 8g

See Also​