This post goes over how to upload a game to itch.io with butler and GitHub Actions.
CLI
You can use butler to upload your game locally to itch.io with the command-line.
First login to butler:
butler login
Then push your game to itch.io:
butler push directory user/game:channel
- Replace
directorywith the folder or.zipfile of your built game - Replace
userwith your itch.io username - Replace
gamewith your game name - Replace
channelwith your project type (e.g., web, linux, windows, mac, etc.)
GitHub Actions
To upload your game to itch.io with GitHub Actions, use setup-butler:
# .github/workflows/upload.yml
name: Upload to itch.io
on: push
jobs:
itchio-upload:
runs-on: ubuntu-latest
steps:
- name: Setup butler
uses: remarkablegames/setup-butler@v2
- name: Upload to itch.io
run: butler push directory user/game:channel
env:
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }}
The BUTLER_API_KEY is your itch.io API key. Generate a key and add it to your repository’s Settings > Secrets and variables > Actions.
Example
Using an example workflow where:
- build is located at the
distfolder - itch.io username is
remarkablegames - game name is
inversion - game is an
html5project
Then the workflow step is:
- name: Upload to itch.io
- run: butler push directory user/game:channel
+ run: butler push dist remarkablegames/inversion:html5
env:
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }}