Docker image to export Godot Engine games. Templates for Gitlab CI and GitHub Actions to deploy to GitLab Pages/GitHub Pages/Itch.io.
Docker image to export Godot Engine games and deploy to GitLab/GitHub Pages and Itch.io using GitLab CI and GitHub Actions.
https://hub.docker.com/r/barichello/godot-ci/
.gitlab-ci.ymland
.github/workflows/godot-ci.ymlare included in this project as reference.
To build a godot project with Mono enabled, change the image tag from
barichello/godot-ci:VERSIONto
barichello/godot-ci:mono-VERSIONin
.gitlab-ci.yml(Gitlab) or
godot-ci.yml(Github). e.g.
barichello/godot-ci:mono-3.2.1.
To build a debug release (debug.keystore), use the
android_debugjob example in the
gitlab-ci.ymlfile.
If you want to export for Android with your own keystore, you can do this with the following steps: 1. Take your generated keystore and convert it to Base64: Linux & macOS:
base64 release.keystore -w 0Windows:
certutil -encodehex -f release.keystore encoded.txt 0x400000012. Go to GitLab Project > Settings > CI/CD > Variables and copy the Base64-encoded keystore value in a new variable
SECRET_RELEASE_KEYSTORE_BASE64as type variable. 3. Create a second variable SECRETRELEASEKEYSTOREUSER as type variable with the alias of your keystore as value. 4. Create a third variable SECRETRELEASEKEYSTOREPASSWORD as type variable with the password of your keystore as value. 5. Use the
androidjob example in the
gitlab-ci.ymlfile.
See this repository for automating GDNative C++ compilation, which is based off this repository.
You have to compile Godot with the modules included first. See this excellent repository by Calinou for automating Godot builds.
After that, you would use the custom build to export your project as usual. See this guide by Greenfox on how to use a custom Godot build for automated exports.
Not available yet. Automating Xcode projects is doable but not trivial, and macOS runners only recently became available for GitHub actions, so it will happen eventually.
Here's a mapping between each supported CI service, the template jobs and a live example.
|CI|Template|Example |-|-|-| |GitLab CI|Godot Exports / GitHub Pages / GitLab Pages / Itch.io|GitLab CI Pipelines |GitHub Actions|Godot Exports | GitHub Actions running
First you need to remove unused jobs/stages from the
.ymlfile you are using as a template(
.gitlab-ci.ymlor
.github/workflows/godot-ci.yml).
https://github.com///settings/secrets- GitLab:
https://gitlab.com///settings/ci_cd
Secrets needed for a GitHub Pages deploy via GitLab CI:
|Variable|Description|Example| |-|-|-| | REMOTEURL | The
git remotewhere the web export will be hosted (in this case GitHub), it should contain your deploy/personal access token|
https://:@github.com//.git| GITEMAIL | Git email of the account that will commit to the
gh-pagesbranch. |
[email protected]| GIT_USERNAME | Username of the account that will commit to the
gh-pagesbranch. |
username
Others variables are set automatically by the
gitlab-runner, see the documentation for predefined variables.
Deployment to Itch.io is done via Butler.
Secrets needed for a Itch.io deploy via GitLab CI:
|Variable|Description|Example| |-|-|-| | ITCHIOUSERNAME | Your username on Itch.io, as in your personal page will be at
https://.itch.io|
username| ITCHIOGAME | the name of your game on Itchio, as in your game will be available at
https://.itch.io/|
game| BUTLERAPIKEY | An Itch.io API key is necessary for Butler so that the CI can authenticate on Itch.io on your behalf. Make that API key
Masked(GitLab CI) to keep it secret |
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
export_presets.cfgmatch the ones used in your CI script.
test-projecttemplate) or not.
Greenfox has an excellent repo that is also for automating Godot exports.