A workflow action to automatically exports your Godot games. Supports standard and Mono builds!
This action automatically reads your export_presets.cfg
file to determine which builds to make. Whenever this action runs each of your defined exports will run. The resulting executables will be posted as zip files attached to the created release.
Additionally, this action creates a release tagged with a Semantic Version. The zip files containing the export results will be attached to this release. More info about releases can be found below.
This action requires that your job utilizes Github's actions/checkout@v1
so that the source code is available for Godot to export the game. See the below example workflow configuration for an example.
Since this action creates releases and uploads the zip file assets, you will need to supply the GITHUB_TOKEN
environment variable. For an example on how to do this, see the below example workflow configuration.
base_version
default0.0.0
- The version which new releases start at. The first release will be this version. After that, releases will automatically be 1 patch version ahead of the version of the latest release. To increment minor and major versions simply set the
base_version
to reflect your desired major and minor versions. When thebase_version
is set to a higher version than the last release version, thebase_version
will be used.
- The version which new releases start at. The first release will be this version. After that, releases will automatically be 1 patch version ahead of the version of the latest release. To increment minor and major versions simply set the
godot_executable_download_url
- The Linux Headless version of Godot that you want to export your project with. For example, to use the current stable of version of Godot your value will be
https://downloads.tuxfamily.org/godotengine/3.1.2/Godot_v3.1.2-stable_linux_headless.64.zip
. If you do not use the Linux Headless version exporting will fail.
- The Linux Headless version of Godot that you want to export your project with. For example, to use the current stable of version of Godot your value will be
godot_export_templates_download_url
- The link to the
.tpz
archive of export templates. Can be found athttps://downloads.tuxfamily.org/godotengine
. The export templates must be for the same version of Godot that you are using ingodot_executable_download_url
. For example, thegodot_export_templates_download_url
that matches thegodot_executable_download_url
version ishttps://downloads.tuxfamily.org/godotengine/3.1.2/Godot_v3.1.2-stable_export_templates.tpz
- The link to the
godot_template_version
- A representation of the Godot version. For the above stable version, this value would be
3.1.2.stable
. For mono, it would be3.1.2.stable.mono
. If you have templates installed on your local machine you can find this exact string by looking at your local templates directory:~/.local/share/godot/templates
for Linux%APPDATA%/Roaming/Godot/templates
for Windows
- A representation of the Godot version. For the above stable version, this value would be
relative_project_path
- The relative path to the directory containing your
project.godot
file. If yourproject.godot
is at the root of your repository then this value should be./
. Do not includeproject.godot
as part of this path.
- The relative path to the directory containing your
Below is a sample workflow configuration file utilizing this action.
# Whenever a push is made to the master branch then run the job
on:
push:
branches:
- master
jobs:
# job id, can be anything
export_game:
# Always use ubuntu-latest for this action
runs-on: ubuntu-latest
# Job name, can be anything
name: Export Game Job
steps:
# Always include the checkout step so that
# your project is available for Godot to export
- name: checkout
uses: actions/checkout@v1
- name: export game
# I recommend using a version other than master. Take a look at the releases
# and https://help.github.com/en/actions/automating-your-workflow-with-github-actions/about-actions#versioning-your-action
uses: firebelley/godot-export@master
with:
# Defining all the required inputs
# I used the mono version of Godot in this example
godot_executable_download_url: 'https://downloads.tuxfamily.org/godotengine/3.2/beta4/mono/Godot_v3.2-beta4_mono_linux_headless_64.zip'
godot_export_templates_download_url: 'https://downloads.tuxfamily.org/godotengine/3.2/beta4/mono/Godot_v3.2-beta4_mono_export_templates.tpz'
godot_template_version: '3.2.beta4.mono'
relative_project_path: './'
# The first release will start at 0.3.0
# Default value is 0.0.0
base_version: '0.3.0'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}