This is an example project with a single GitHub actions workflow to push a project to Itch.io. The project will be playable on Itch.io at deplicator.itch.io/github-godot4-itchio and have a download for Linux, MacOS, and Windows.
The name of the Godot project and Itch.io project URL are the same. They contain no spaces or
invalid URL characters. They don't have to be this way, but the workflow script uses an env called
PROJECT_NAME
that relies on the consistency.
In Godot Exports, the export
names
use the same name as Itch.io Channels. The
script uses the channel names html
, linux
, macos
, and windows
for
building
and
pushing
to Itch.io.
Export path is export/<project name>-<channel>.{zip|exe}
- This example uses
exports/github-godot4-itch.io-linux.zip
for linux html
is an exception, it will beexports/html/index.html
, details in Workflow section below
Setup a project in Itch.io with the same url name as the Godot project.
- Change Kind of project to HTML.
Under Embed options:
- Change the Viewport dimensions to match the game
- This project uses Godot defaults of 1152x648
- Check the box next to SharedArrayBuffer support
- Note: This will not be playable on Safari, it's a known issue.
- Godot 4's HTML5 exports currently cannot run on macOS and iOS due to upstream bugs with SharedArrayBuffer and WebGL 2.0.
Get API Key by going to User dropdown -> Settings -> API keys. Generate a new API key or copy an existing one. It will be used in the GitHub section next.
Add two secretes to the repository by going to Settings -> Secrets and variables -> Actions -> New repository secret.
ITCHIO_API_KEY
- API key from Itch.io (copied in previous section)ITCHIO_USERNAME
- Your Itch.io username, this doesn't have to be a secret, it can be typed into the script
The workflow defined at .github\workflows\deploy.yml
runs manually.
It is started by navigating to the Actions tab, choosing the workflow named Deploy to Itch.io
,
then clicking the "Run Workflow" dropdown. From there the branch can be chosen, then click the "Run
workflow" button.
Builds the Godot project for four platforms; Linux, MacOS, Web, and Windows.
- Downloads Godot and Export Templates
- Build 4 versions of the project
- Zip file for Linux and MacOS
- Exe for Windows
- Several files for Web, they all get compressed into a zip
Pushes everything to Itch.io using Butler.
When done, the project will be updated with the version built from this repository. Itch.io will also show a notification.
- Godot4: GitLab -> Itch.io - the same project but for GitLab