Skip to main content
MCReleaser is configured entirely through environment variables or system properties. This flexible approach allows you to use the tool in various environments, from local command-line execution to CI/CD pipelines and Docker containers.

Configuration Methods

There are two ways to provide configuration values to MCReleaser:

Environment Variables

Environment variables use UPPER_CASE_WITH_UNDERSCORES naming convention. This is the preferred method when using Docker or CI/CD systems.
export NAME="My Minecraft Plugin"
export VERSION="1.0.0"
export DESCRIPTION="A cool plugin"
export GAME_VERSIONS="1.20.1 1.20.2 1.20.4"

System Properties

System properties use camelCase naming convention and are passed with the -D flag. This is the preferred method for direct Java execution.
java -Dname="My Minecraft Plugin" \
     -Dversion="1.0.0" \
     -Ddescription="A cool plugin" \
     -DgameVersions="1.20.1 1.20.2 1.20.4" \
     -jar mcreleaser.jar

Naming Convention Conversion

MCReleaser automatically handles the conversion between environment variable names and system property names:
  • Environment variables: UPPER_CASE_WITH_UNDERSCORES
  • System properties: camelCase
The conversion follows these rules:
  1. Convert from camelCase to UPPER_CASE by inserting underscores before uppercase letters
  2. Convert all characters to uppercase

Examples

System PropertyEnvironment Variable
nameNAME
versionVERSION
gameVersionsGAME_VERSIONS
githubTokenGITHUB_TOKEN
modrinthProjectMODRINTH_PROJECT
curseforgeReleaseTypeCURSEFORGE_RELEASE_TYPE
This is implemented in the PropertyKey class:
private static String camelToConstant(String camel) {
    StringBuilder constant = new StringBuilder();
    for (char c : camel.toCharArray()) {
        if (Character.isUpperCase(c)) {
            constant.append('_');
        }
        constant.append(Character.toUpperCase(c));
    }
    return constant.toString();
}
Source: /workspace/source/core/src/main/java/me/hsgamer/mcreleaser/core/property/PropertyKey.java:18

Value Resolution Priority

When resolving configuration values, MCReleaser checks sources in the following order:
  1. Environment variables (checked first)
  2. System properties (checked if environment variable is not set)
This allows you to override system properties with environment variables when needed.
public String getValue() {
    String value = System.getenv(env);
    if (value == null) {
        value = System.getProperty(key);
    }
    return value;
}
Source: /workspace/source/core/src/main/java/me/hsgamer/mcreleaser/core/property/PropertyKey.java:45

Configuration Categories

Configuration variables are organized into several categories:
  • Common - Required variables for all platforms (NAME, VERSION, DESCRIPTION, etc.)
  • GitHub - GitHub Releases specific configuration
  • Modrinth - Modrinth specific configuration
  • Hangar - Hangar (PaperMC) specific configuration
  • Polymart - Polymart specific configuration
  • CurseForge - CurseForge specific configuration

Missing Variable Handling

By default, MCReleaser silently skips platforms when required variables are missing. You can enable announcements for missing variables:
ANNOUNCE_MISSING_KEY
boolean
default:"false"
When enabled, MCReleaser will log error messages listing all missing required variables for each platform.
# Enable missing key announcements
export ANNOUNCE_MISSING_KEY=true
This is useful for debugging configuration issues, especially in CI/CD environments.

Build docs developers (and LLMs) love