Build Management

Stash CLI

Learn how to use the Stash CLI to integrate build uploads and release management into your pipelines and CI/CD workflows. Download the CLI for Windows or macOS and automate your game distribution.

Use the Stash CLI to integrate build uploads and release management into your pipelines and CI/CD workflows.

One-line installers

Run the following one-line installers to set up the Stash CLI:

Windows:

powershell.exe -ExecutionPolicy Bypass -Command "IEX (Invoke-WebRequest 'https://cli.stash.gg/install.ps1')"

Unix (macOS, Linux):

/bin/bash -c "$(curl -fsSL https://cli.stash.gg/install.sh)"

After installation, run the CLI with stash-cli.

Upload builds

Use the Stash CLI to upload and configure builds. Run a separate command for each target platform.

stash-cli upload --env=<test|prod> \
--secret=<secret_from_stash_studio> \
--file_path=<zip_file_name> \
--executable_path="Build\my_game.exe" \
--platform=<windows|mac>
--channel=<channel_id>

Parameters

The following table lists the parameters for the upload command.

ParameterDescriptionExampleRequired
secretYour Stash Studio secret. Find it in Settings > API SecretsHFeMGWYd-TnYes
file_pathLocal path to the ZIP file you want to upload/Users/dev/builds/test.zipYes
executable_pathThe path to the game executable within the zip folder/build/test-build.exe (Windows) /build/test-build.app/Contents/MacOS/TestBuild (Mac)Yes
platformThe platform for the binarywindows or macYes
envThe environment to upload the binarytest or prodNo
channelThe release channel ID. Find it in Launcher > Channels933e5aae-2e9-c8bd30No

Maintenance mode

The Stash CLI can also turn launcher maintenance mode on and off, so your maintenance automation can block game downloads and launches while your servers are down. See Launcher Maintenance Mode for the commands and behavior.

CI/CD

The Stash CLI is great for CI/CD pipelines to automate your build uploads to the launcher. Here is a simple GitHub Actions / Jenkins sample:

# Install Stash CLI on Unix runner
- name: Install Stash CLI
  run: |
    /bin/bash -c "$(curl -fsSL https://cli.stash.gg/install.sh)"
    echo "Stash CLI installed"
    stash-cli --version

# Upload macOS build to Stash Studio using Stash CLI
- name: Upload macOS build to Stash Studio
  run: |
    stash-cli upload \
      --env=test \
      --secret="${{ secrets.STASH_API_KEY }}" \
      --file_path="${{ github.workspace }}/StandaloneOSX-latest.zip" \
      --executable_path="${{ env.EXECUTABLE_PATH }}" \
      --platform=mac \
      --channel="${{ env.LAUNCHER_CHANNEL_ID }}"
    echo "Build uploaded to Stash Studio"

How is this guide?