From Unity to Steam: GitHub Actions CI/CD Pipeline

The jist: you have a super awesome game. Your super awesome game is on Steam. One day, you have a super awesome update for your super awesome game. So, you build out the game on your PC and manually upload it to Steam. This is all fine and dandy, but it’s repetitive. Also, it takes time to do this. So, like all repetitive and time-stealing tasks, it is time to automate!

The goal: have a release branch that whenever it receives a push, build the updated version of the game and send it over to Steam.

1. Automate the Unity Build

Prior to this endeavor, I already had a game-in-progress to test with. In the root of that game’s repo, I created a folder “.github” as well as a subfolder “workflows” to contain the file needed for GitHub Actions.

I found a template that had the GitHub Actions code primed and ready. At the moment, I only need Windows builds, so I commented out the others. So, copy and paste and it’ll work perfectly, right? Of course not! I received a “no space left on device” error. After a little shuffling around of previously-existing code, I ended up calling the cleanup earlier to circumnavigate the error. Then- it worked!

However, I was not satisfied. I only wanted the action to run on a “release” branch and I didn’t want to include the infamous DoNotShip folder with the game. Luckily, these additions weren’t anything crazy (and the latter was already included with shipping to Steam!).

2. Send the Build to Steam

I started with the grave mistake of watching the official Steam build upload video (~10 years old). Needless to say, that did not last long.

I found a super cool repo called steam-deploy that was exactly what I was looking for! With this, I got to bypass the cryptic Steam setup process, and get an automation in the process! Talk about a win-win.

3. Conclusion

Honestly, the process was way easier than I thought it would be. I should probably have some sort of approval system for updating the release branch- I’m unsure if I need to pay for that in GitHub.

Resources

CI/CD for Unity – NEW Github Actions
Game CI
steam-deploy

Leave a Reply

Your email address will not be published. Required fields are marked *