Godot Continuous Deployment from GitHub to Itch.io

Automatically build and upload your GitHub-hosted game to Itch.io!

For context, Tanner and I have been working on a 2D game using Godot, a game engine that is just a pleasure to work in.

TL;DR: Here's the workflow file

Some important steps to get this working:

Throw that code into a workflow file in your repo and replace the necessary fields to get up and running quick! This particular setup is for exporting and uploading a Windows build for download and an HTML5 build for running in the game's Itch.io page (which may not be exactly optimal depending on the kind of game you're making).

Exporting the game

The first step is to automatically export the game. You can export from the godot cli with the godot --export command. Here we use godot-ci to achieve this. It runs a docker container with links pointing to the proper Godot builds and uses them to export the game in a headless instance of Godot. It also has support for automatically publishing an HTML5 build to GitHub pages, and if you're using GitLab it can even publish straight to Itch.io (but I'm not ¯\_(ツ)_/¯ )!

The exported artifact is then uploaded to the action's local store, allowing you to download and inspect the contents of the export zip files in the action output on GitHub. These can also be used for further processing in another workflow, if desired.

Alternative action

An alternative action for exporting would be Godot Export, which is probably a bit lighter and supports automatically creating releases as well, which is cool.

Uploading the game

The next step is simply to use the Butler Push action to upload the zips to Itch.io. This one's as straightforward as it seems. You fill in the proper values in the env attribute and it will read in from the repo secret and push to the channel you set up earlier (you set all that up, right).

Viola! Automatic Itch.io builds and uploads. Now it'll be much easier to haphazardly share your incremental progress with friends and Internet strangers.