Itch - BredaUniversityGames/JenkinsLib GitHub Wiki
Deploys your build to itch.io via Butler.
stages {
perforce.sync()
ue5.build()
itch.deploy()
discord.alert()
}- Butler installed on the build agent
-
ITCH_BUTLER_PATHenvironment variable set on the Jenkins node (see Server Setup — Environment Variables) - A game page created on itch.io (see Creating a Game Page)
- Butler API key stored as a Jenkins credential (see Credential Setup)
| Parameter | Default | Description |
|---|---|---|
ITCH_CREDENTIALS_ID |
(empty) | Jenkins credential for Butler API key (Secret text) |
ITCH_TARGET |
(empty) | itch.io target (user/game:channel) — see Target Format
|
Butler pushes to an existing game page — it does not create one. You must create the page on itch.io before running the pipeline.
- Go to https://itch.io/game/new
- Fill in the Title field — itch.io generates a URL slug from this (e.g.,
Awesome Gamebecomesawesome-game) - Set Kind of project to Downloadable (the default)
- Set Pricing and Visibility as desired
- Click Save — the page does not need to be public for Butler uploads to work
Note: For HTML5 games, set Kind of project to HTML instead of Downloadable, and after the first Butler push, tag the channel as playable in browser from the Edit game page.
Before you can get an API key, you need to run Butler's login flow on your local machine:
butler loginThis opens a browser window to authenticate with itch.io and stores credentials locally.
After login, find the API key with source wharf in one of these locations:
| Platform | Path |
|---|---|
| Windows | %USERPROFILE%\.config\itch\butler_creds |
| Linux | ~/.config/itch/butler_creds |
| macOS | ~/Library/Application Support/itch/butler_creds |
Alternatively, find it on your itch.io API keys settings page — the key you need has its source set to wharf.
- Navigate to your team's folder in Jenkins
- Credentials > Add Credentials
-
Kind:
Secret text - Secret: paste the API key from step 2
-
ID: e.g.,
itch-myproject
The pipeline passes this credential via the BUTLER_API_KEY environment variable, which Butler reads automatically in CI environments.
Security: Your API key is a secret. If it ever appears in build logs, revoke it immediately from the API keys page and create a new one.
The ITCH_TARGET parameter uses the format user/game:channel:
-
user— your itch.io username or organization name -
game— the URL slug of your game page (visible in the URL:https://user.itch.io/game) -
channel— a label for this upload slot (e.g.,win64,linux,osx)
-
myteam/awesome-game:win64— uploads to the win64 channel -
myteam/awesome-game:linux— uploads to the linux channel -
myteam/awesome-game:osx— uploads to the macOS channel
Butler automatically tags uploads based on keywords in the channel name:
| Keyword in channel name | Tagged as |
|---|---|
win or windows
|
Windows |
linux |
Linux |
mac or osx
|
macOS |
android |
Android |
A channel name can contain multiple platform keywords (e.g., win-linux-mac-stable). Use lowercase with dashes (kebab-case) for channel names.
Channels are created automatically on the first push — no manual setup required. Subsequent pushes to the same channel update the existing upload, and Butler handles diffing and incremental uploads automatically.
- Locates the platform-specific build output directory
- Pushes the build to itch.io using
butler push - Butler handles diffing and incremental uploads automatically