Use github actions on push / pull requests to build your arduboy game (and make release)

I’m not sure people are aware but you can actually let github build your arduboy game on each push (or pull request) you do and you can also create a github action to take the last known succesfull build to make a draft release out of it. It would seem there are github actions for using the “commandline arduino tools” so i experimented with it

this is my build github workflow and it’s almost identical to the example provided by arduino, it’s fully commented so should be easy to figure out what’s going on (note comments are not made by me it’s actually from the arduino example). I also added uploading of artifacts (make build files downloadable so you basically can have versions for each push you do and people can download those (if they are logged in))

it’s really handy…

The make a release workflow i trigger manually there actually becomes a button available to run that workflow on demand once uploaded.

and all it does with me is download the artifact from the last known successful build (from a workflow you specify) rezip it (you can add other files in this step if wanted) and make a draft release out of it when you feel like it. Then you can go to the releases section to edit your draft release and make it a final / real release.

This is really handy if you want to provide some kind of ongoing builds easily for people to download from the action section when developing your game and it’s also handy to verify your committed code actually compiles. I sometimes edit code before a commit and it can contain mistakes then so you’d know as you get an email when a build fails. Or when you work with multiple people on a project and you do pull requests.

There are plenty of ways to implement / create these github actions so my way is probably not the best but it works for me and i thought i would mention it as i’m not sure many people are aware of this.

8 Likes

I’ve long suspected there might be a way to use GitHub actions or hooks to publish Arduboy games to some kind of public game collection, but I never anticipated that GitHub would actually be able to compile games.

This is quite a game-changer. Excellent discovery.

3 Likes

Did not know this! Thanks a lot!