Itch - BredaUniversityGames/JenkinsLib GitHub Wiki

itch.deploy()

Deploys your build to itch.io via Butler.

Usage

stages {
    perforce.sync()
    ue5.build()
    itch.deploy()
    discord.alert()
}

Prerequisites

Parameters

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

Creating a Game Page

Butler pushes to an existing game page — it does not create one. You must create the page on itch.io before running the pipeline.

  1. Go to https://itch.io/game/new
  2. Fill in the Title field — itch.io generates a URL slug from this (e.g., Awesome Game becomes awesome-game)
  3. Set Kind of project to Downloadable (the default)
  4. Set Pricing and Visibility as desired
  5. 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.

Credential Setup

1. Login to Butler locally

Before you can get an API key, you need to run Butler's login flow on your local machine:

butler login

This opens a browser window to authenticate with itch.io and stores credentials locally.

2. Find your API key

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.

3. Add the API key to Jenkins

  1. Navigate to your team's folder in Jenkins
  2. Credentials > Add Credentials
  3. Kind: Secret text
  4. Secret: paste the API key from step 2
  5. 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.

Target Format

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)

Examples

  • 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

Channel Platform Auto-Detection

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.

How It Works

  1. Locates the platform-specific build output directory
  2. Pushes the build to itch.io using butler push
  3. Butler handles diffing and incremental uploads automatically
⚠️ **GitHub.com Fallback** ⚠️