Deploying to Steam using GitLab

Michael Stypa
plapadoo
Published in
3 min readAug 28, 2019

--

While developing reaktron (https://reaktron.com — a snaker game on powerups) we made use of a git branching model with master, develop and feature branches. This way, all team members can work collaboratively and in parallel. Additionally we wanted to be able to test fixes and new features against the production infrastructure (you can read more about how we run reaktron game servers here). Steam gives you the ability to run multiple “betas” of your software. Let’s call them steam branches for now. Inside the steam client, you can select which steam branch you want to install from. This allows us to map our git branches to steam branches. Within GitLab CI we automated the deployment of different versions (master, develop) to steam.

reaktron Gitlab CI pipeline
reaktron GitLab CI pipeline for branch develop

A multiplatform video game

As reaktron is available on Windows, macOS and Linux we need to build a steam package for each platform. Luckily GitLab Runner is available on all three. You will have to invest a good amount of time setting up the necessary dependencies on each platform. We suggest you write all helper scripts in bash. This way you can reuse the scripts and keep things consistent.

To publish a steam package you need to upload it to the SteamPipe Content System. There is a basic tutorial video created by Valve on how to do this. We wrote a script to configure a template depot config for each package of the game. This way we can adjust the package configuration via GitLab CI environment variables. When you upload your steam package you can tell steam to publish the new package immediately (as long as its not the steam default branch).

reaktron stem content builder config

Tip: If you test a newly rolled out version make sure to select the wanted steam branch and restart your steam client. Restarting the steam client forces it to fetch the newest package versions. Otherwise you have to wait for the client to run into its timeout to fetch the new package information.

Automating this process saves a lot of time as packaging and uploading by hand is a mundane and time consuming process. By using CI/CD we can deploy a new development version by merging into the git develop branch. Using scripts we can automatically configure the builds to use different servers and start the game with or without debug parameters.

--

--