Skip to main content
MCReleaser allows you to publish your artifacts to individual platforms. This is useful when you want to target a specific community or have different release strategies for different platforms.

Selecting a Platform

To publish to a single platform, use the PLATFORMS environment variable (or -Dplatforms property for CLI) and specify one of the supported platforms:
  • github - GitHub Releases
  • modrinth - Modrinth
  • hangar - Hangar (PaperMC)
  • polymart - Polymart
  • curseforge - CurseForge

Publishing to Modrinth

Here’s a complete example of publishing to Modrinth only:
java \
  -Dname="My Awesome Mod" \
  -Dversion="1.0.0" \
  -Ddescription="A mod that adds cool features" \
  -DgameVersions="1.20.1,1.20.2" \
  -Dplatforms="modrinth" \
  -Dfiles="build/libs/*.jar" \
  -DmodrinthToken="$MODRINTH_TOKEN" \
  -DmodrinthProject="my-project-id" \
  -DmodrinthLoaders="fabric,forge" \
  -jar mcreleaser.jar
The platforms parameter is case-insensitive, so modrinth, Modrinth, and MODRINTH all work.

Publishing to GitHub Releases

java \
  -Dname="My Plugin" \
  -Dversion="2.0.0" \
  -Ddescription="Bug fixes and improvements" \
  -Dplatforms="github" \
  -Dfiles="target/*.jar" \
  -DgithubToken="$GITHUB_TOKEN" \
  -DgithubRepository="username/repo" \
  -DgithubRef="refs/tags/v2.0.0" \
  -jar mcreleaser.jar

Publishing to CurseForge

java \
  -Dname="My Mod" \
  -Dversion="1.5.0" \
  -Ddescription="New features for 1.20" \
  -DgameVersions="1.20.1" \
  -Dplatforms="curseforge" \
  -Dfiles="build/libs/*-all.jar" \
  -DcurseforgeToken="$CURSEFORGE_TOKEN" \
  -DcurseforgeProject="123456" \
  -DcurseforgeModLoaders="Forge" \
  -jar mcreleaser.jar

Platform-Specific Configuration

Each platform requires its own set of environment variables. Here’s a quick reference:

Required Variables by Platform

PlatformRequired Variables
GitHubGITHUB_TOKEN, GITHUB_REPOSITORY, GITHUB_REF
ModrinthMODRINTH_TOKEN, MODRINTH_PROJECT, MODRINTH_GAME_VERSIONS, MODRINTH_LOADERS
HangarHANGAR_KEY, HANGAR_PROJECT, HANGAR_CHANNEL, HANGAR_GAME_VERSIONS
PolymartPOLYMART_KEY, POLYMART_RESOURCE
CurseForgeCURSEFORGE_TOKEN, CURSEFORGE_PROJECT
Check the Configuration Reference for a complete list of all available environment variables for each platform.

Next Steps

Multiple Platforms

Learn how to publish to multiple platforms simultaneously

File Handling

Understand how to specify which files to upload

Build docs developers (and LLMs) love