Skip to content

Publish your plugin on the Steam Workshop

A plugin can reach players as a Steam Workshop mod. Players subscribe to it, enable it in the Paradox launcher and approve the plugin in Anvil; see Plugins from mods for what they see.

The mod holds descriptor.mod and, next to it, anvil/<plugin-id>/ for each plugin it carries: the plugin folder as anvil_add_plugin lays it out. Every change to any file in that folder is a new version that players have to approve.

In Anvil’s lab tests on EU4 1.37.5 (design notes, §14), such a mod kept the game’s checksum and ironman achievements, and a private Workshop upload delivered the DLL byte for byte.

Publishing goes through paradox-workshop-publish (pdx-ws), a command-line tool and GitHub Action: you create the Workshop item once from your computer, and CI publishes every release after that.

A repository made from anvil-plugin-template is ready for the Workshop:

Path What
workshop/descriptor.mod the mod’s name, the same on Steam and in the launcher: <Name> - <what it does>, for example Bellows - Faster Start, Faster Game
workshop/description.md the Workshop description, in Markdown; every publish replaces the one on Steam with it
workshop/thumbnail.png the preview image, a placeholder until you generate yours
workshop.toml the pdx-ws configuration, with checksum = "keep": pdx-ws refuses a mod that would change the game’s checksum
.github/workflows/build.yml on every pull request, a dry run that shows in the job summary what a release would publish
.github/workflows/release.yml release-please: merging its pull request creates a draft release with the zips, among them the mod as <id>-<version>-workshop.zip
.github/workflows/workshop-publish.yml publishes the mod when you publish a release; off until the variable WORKSHOP_PUBLISH is true

The built plugin in workshop/anvil/<plugin-id>/ is not in Git: CI copies it there. The template’s README section Publish to the Steam Workshop has the exact commands.

You need Steam running and logged in to the account that owns EU4 and will own the item, and the GitHub CLI (gh).

  1. Install pdx-ws from its releases, as the setup guide describes. Keep the files of the archive together and put the folder on your PATH.

  2. Build the plugin and copy it into the mod, then check what would be published:

    Terminal window
    cmake --build build --config Release
    New-Item -ItemType Directory workshop/anvil -Force
    Copy-Item build/plugin/my-plugin workshop/anvil -Recurse -Force
    pdx-ws plan
  3. Create the Workshop item with pdx-ws init. It works through the Steam client (client mode): it creates a private item with the descriptor’s name and tags and the preview, uploads the mod and writes the item’s remote_file_id into workshop/descriptor.mod. Commit that line through a pull request; every later publish finds the item by it.

  4. Create the steam-workshop environment in the repository:

    Terminal window
    gh api --method PUT repos/OWNER/REPO/environments/steam-workshop

    Then, in Settings → Environments → steam-workshop, add yourself as a required reviewer and allow only the tags v*.

  5. Save a Steam session in the environment. Read the security notes first. session export asks for your password and Steam Guard code once:

    Terminal window
    pdx-ws session export --user my_steam_name | gh secret set STEAM_SESSION --env steam-workshop
    gh secret set STEAM_USERNAME --env steam-workshop --body my_steam_name

    Publishing several plugins from one GitHub organization? One session can serve them all as organization secrets limited to those repositories; the environment then keeps no secrets of its own but still gates every publish. Every workflow in those repositories can read an organization secret, so the setup guide explains when that is acceptable.

  6. Turn publishing on:

    Terminal window
    gh variable set WORKSHOP_PUBLISH --body true
  1. Merge the release pull request. release.yml tags vX.Y.Z and creates a draft release; wait until it has attached the zips.
  2. Edit the release notes if you like and publish the draft. The notes become the Workshop change note.
  3. Approve the steam-workshop deployment of the workshop-publish run.

The workflow downloads the release’s plugin zip, checks its build attestation (in a private repository, only its line in SHA256SUMS.txt), so the Workshop gets exactly the build GitHub serves, and publishes the mod in steamcmd mode with the saved session. Publishing never changes the item’s visibility: make it public on Steam when you are ready. When the session has expired, the job fails with exit code 3; run pdx-ws session export again to replace the secret.

Every published version is a new version for players: Anvil asks them to approve it, and the version they approved keeps running until they do.

Happy Dwarf Team plugins follow the Workshop page convention: the title, the tone, the sections of the description and the FAQ. Start workshop/description.md from the template’s skeleton.

Generate the thumbnail with tools/workshop-thumbnail from your plugin’s icon on this site, src/assets/plugins/<plugin-id>.svg in anvil-website, with the two parts of the title. A plugin without an icon gets one here first, following the icon rules, so the site and the Workshop show the same mark. Commit the result as workshop/thumbnail.png.

The Steam session lets whoever has it publish and update content for every Workshop item your account can manage, not only this one. It does not contain your password or your Steam Guard secret. The pdx-ws security notes explain what it allows, how to keep it safe and how to revoke it (“Deauthorize all devices” in Steam Guard, or a new password).

Bellows is the reference plugin: it went from the template through CI to the Workshop. See its workshop/ folder, workshop.toml and workshop-publish.yml.