• Stars
    star
    221
  • Rank 178,986 (Top 4 %)
  • Language
    Shell
  • License
    MIT License
  • Created over 4 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Github Action to deploy a game to Steam

Steam Deploy

Actions status

Github Action to deploy a game to Steam

Setup

Prerequisites

This action assumes you are registered as a partner with Steam.

1. Create a Steam Build Account

Create a specialised builder account that only has access to Edit App Metadata and Publish App Changes To Steam.

https://partner.steamgames.com/doc/sdk/uploading#Build_Account

2. Export your build

In order to upload a build, this action is assuming that you have created that build in a previous step or job.

For an example of how to do this in Unity, see Unity Actions.

The exported artifact will be used in the next step.

3. Configure for deployment

In order to configure this action, configure a step that looks like the following:

(The parameters are explained below)

Option A. Using MFA files

jobs:
  deployToSteam:
    runs-on: ubuntu-latest
    steps:
      - uses: game-ci/steam-deploy@v3
        with:
          username: ${{ secrets.STEAM_USERNAME }}          
          configVdf: ${{ secrets.STEAM_CONFIG_VDF}}          
          appId: 1234560
          buildDescription: v1.2.3
          rootPath: build
          depot1Path: StandaloneWindows64
          depot2Path: StandaloneLinux64
          releaseBranch: prerelease

Option B. Using TOTP

jobs:
  deployToSteam:
    runs-on: ubuntu-latest
    steps:
      - uses: CyberAndrii/steam-totp@v1
        name: Generate TOTP
        id: steam-totp
        with:
          shared_secret: ${{ secrets.STEAM_SHARED_SECRET }}
      - uses: game-ci/steam-deploy@v3
        with:
          username: ${{ secrets.STEAM_USERNAME }}          
          totp: ${{ steps.steam-totp.outputs.code }}
          appId: 1234560
          buildDescription: v1.2.3
          rootPath: build
          depot1Path: StandaloneWindows64
          depot2Path: StandaloneLinux64
          releaseBranch: prerelease

Configuration

username

The username of the Steam Build Account that you created in setup step 1.

totp

Deploying to Steam using TOTP. If this is not passed, configVdf is required.

configVdf

Deploying to Steam requires using Multi-Factor Authentication (MFA) through Steam Guard unless totp is passed. This means that simply using username and password isn't enough to authenticate with Steam. However, it is possible to go through the MFA process only once by setting up GitHub Secrets for configVdf with these steps:

  1. Install Valve's offical steamcmd on your local machine. All following steps will also be done on your local machine.
  2. Try to login with steamcmd +login <username> <password> +quit, which may prompt for the MFA code. If so, type in the MFA code that was emailed to your builder account's email address.
  3. Validate that the MFA process is complete by running steamcmd +login <username> +quit again. It should not ask for the MFA code again.
  4. The folder from which you run steamcmd will now contain an updated config/config.vdf file. Use cat config/config.vdf | base64 > config_base64.txt to encode the file. Copy the contents of config_base64.txt to a GitHub Secret STEAM_CONFIG_VDF.
  5. If: when running the action you recieve another MFA code via email, run steamcmd +set_steam_guard_code <code> on your local machine and repeat the config.vdf encoding and replace secret STEAM_CONFIG_VDF with its contents.

appId

The identifier of your app on steam. You can find it on your dashboard.

buildDescription

The identifier for this specific build, which helps you identify it in steam.

It is recommended to use the semantic version of the build for this.

rootPath

The root path to your builds. This is the base of which depots will search your files.

depot[X]Path

Where X is any number between 1 and 9 (inclusive both).

The relative path following your root path for the files to be included in this depot.

If your appId is 125000 then the depots 125001 ... 125009 will be assumed.

firstDepotIdOverride

You can use this to override the ID of the first depot in case the IDs do not start as described in depot[X]Path (e.g. for DLCs).

If your firstDepotId is 125000 then, regardless of the used appId, the depots 125000 ... 125008 will be assumed.

(feel free to contribute if you have a more complex use case!)

releaseBranch

The branch within steam that this build will be automatically put live on.

Note that the default branch has been observed to not work as a release branch, presumably because it is potentially dangerous.

Other Notes

Excluded Files / Folders

Certain file or folder patterns are excluded from the upload to Steam as they're unsafe to ship to players:

  • *.pdb - symbols files
  • Folders that Unity includes in builds with debugging or other information that isn't intended to be sent to players:
    • *_BurstDebugInformation_DoNotShip
    • *_BackUpThisFolder_ButDontShipItWithYourGame

More Repositories

1

unity-actions

Github actions for testing and building Unity projects
Mathematica
963
star
2

unity-builder

Build Unity projects for different platforms
TypeScript
842
star
3

docker

Series of CI-specialised docker images for Unity.
Dockerfile
394
star
4

unity3d-gitlab-ci-example-mirror

🍴Mirror of the game-ci/unity3d-gitlab-ci-example project. If you are looking for Github Actions, refer to https://game.ci/ documentation instead
C#
240
star
5

unity-test-runner

Run tests for any Unity project
TypeScript
206
star
6

documentation

πŸ“š Documentation for GameCI open source projects
MDX
180
star
7

unity-request-activation-file

Unity - Request manual activation file (part of unity-actions)
JavaScript
54
star
8

unity-activate

Activate personal or professional license for Unity
TypeScript
42
star
9

unity-actions-example

Example using Unity Actions to test and build a unity project.
C#
39
star
10

unity-license-activate

Activate Unity license through CLI
JavaScript
29
star
11

unity-return-license

Github Action to return a Unity pro license.
Dockerfile
18
star
12

unity-verify-code

An email parser to get 6 digit verification code
JavaScript
14
star
13

versioning-backend

Stateful backend to keep track of unity versions and docker build queues
TypeScript
11
star
14

unity3d-appveyor-proof-of-concept

This is a proof of concept to build Unity3d projects on the Appveoyr platform.
Mathematica
9
star
15

unity-orb

Build and test Unity projects for several platforms using CircleCI.
Shell
7
star
16

unity3d-windows-build-scripts-drafts

JavaScript
6
star
17

cli

Cross platform command-line interface for building, testing and deploying your projects.
TypeScript
6
star
18

editor-workbench

A tool to inspect and manage Game-CI workloads from inside the Unity Editor
C#
3
star