Skip to main content
Configure MCReleaser to publish your mods and plugins to CurseForge.

Required Variables

CURSEFORGE_TOKEN
string
required
The CurseForge API token used to authenticate with the CurseForge API.You can generate an API token from your CurseForge account settings.Example:
export CURSEFORGE_TOKEN="your-curseforge-token"
or with system properties:
java -DcurseforgeToken="your-curseforge-token" -jar mcreleaser.jar
CURSEFORGE_PROJECT
string
required
The CurseForge project ID where the version will be uploaded.You can find your project ID in your project’s settings or URL.Example:
export CURSEFORGE_PROJECT="123456"
or with system properties:
java -DcurseforgeProject="123456" -jar mcreleaser.jar

Optional Variables

CURSEFORGE_TYPE
string
default:"minecraft"
The type of game this artifact is for.Valid values:
  • minecraft - Minecraft (Java Edition)
  • hytale - Hytale
Example:
export CURSEFORGE_TYPE="minecraft"
or with system properties:
java -DcurseforgeType="minecraft" -jar mcreleaser.jar
CURSEFORGE_RELEASE_TYPE
string
default:"release"
The release type of the artifact.Valid values:
  • release - Stable, production-ready release
  • beta - Beta testing version
  • alpha - Alpha testing version
Example:
export CURSEFORGE_RELEASE_TYPE="release"
or with system properties:
java -DcurseforgeReleaseType="beta" -jar mcreleaser.jar
CURSEFORGE_GAME_VERSIONS
string
Space-separated list of Minecraft versions that this version supports.If not set, MCReleaser will use the common GAME_VERSIONS variable as a fallback.Example:
export CURSEFORGE_GAME_VERSIONS="1.20.1 1.20.2 1.20.4"
or with system properties:
java -DcurseforgeGameVersions="1.20.1 1.20.2 1.20.4" -jar mcreleaser.jar
CURSEFORGE_RELATIONS
string
JSON array or formatted string defining relationships to other CurseForge projects.Relations specify dependencies, embedded libraries, incompatibilities, or optional integrations.Example:
export CURSEFORGE_RELATIONS='[{"slug":"jei","type":"optionalDependency"}]'
CURSEFORGE_MOD_LOADERS
string
Space-separated list of mod loaders that this version supports.Valid values: forge, fabric, quilt, neoforge, riftExample:
export CURSEFORGE_MOD_LOADERS="fabric"
or with system properties:
java -DcurseforgeModLoaders="forge fabric" -jar mcreleaser.jar
CURSEFORGE_JAVA_VERSION
string
The minimum Java version required for this artifact.Valid values: 8, 16, 17, 18, 21, etc.Example:
export CURSEFORGE_JAVA_VERSION="17"
or with system properties:
java -DcurseforgeJavaVersion="17" -jar mcreleaser.jar
CURSEFORGE_ENVIRONMENT
string
The environment(s) where this mod can run.Valid values:
  • client - Client-side only
  • server - Server-side only
  • both - Both client and server
Example:
export CURSEFORGE_ENVIRONMENT="both"
CURSEFORGE_MANUAL
boolean
Whether to manually create the release. When enabled, the release will not be automatically published and will require manual approval.Example:
export CURSEFORGE_MANUAL=true
or with system properties:
java -DcurseforgeManual=true -jar mcreleaser.jar

Source Reference

CurseForge properties are defined in:
/workspace/source/curseforge/src/main/java/me/hsgamer/mcreleaser/curseforge/CurseForgePropertyKey.java:7
public interface CurseForgePropertyKey {
    PropertyPrefix CURSEFORGE = new PropertyPrefix("curseforge");
    PropertyKey TOKEN = CURSEFORGE.key("token");
    PropertyKey PROJECT = CURSEFORGE.key("project");
    PropertyKey TYPE = CURSEFORGE.key("type");
    PropertyKey RELEASE_TYPE = CURSEFORGE.key("releaseType");
    PropertyKey GAME_VERSIONS = CURSEFORGE.key("gameVersions");
    PropertyKey RELATIONS = CURSEFORGE.key("relations");
    PropertyKey MOD_LOADERS = CURSEFORGE.key("modLoaders");
    PropertyKey JAVA_VERSION = CURSEFORGE.key("javaVersion");
    PropertyKey ENVIRONMENT = CURSEFORGE.key("environment");
    PropertyKey MANUAL = CURSEFORGE.key("manual");
}

Complete Example

Using Environment Variables

export NAME="AwesomeMod"
export VERSION="4.2.0"
export DESCRIPTION="Major update with new features"
export CURSEFORGE_TOKEN="your-curseforge-token"
export CURSEFORGE_PROJECT="123456"
export CURSEFORGE_TYPE="minecraft"
export CURSEFORGE_RELEASE_TYPE="release"
export CURSEFORGE_GAME_VERSIONS="1.20.1 1.20.2 1.20.4"
export CURSEFORGE_MOD_LOADERS="fabric"
export CURSEFORGE_JAVA_VERSION="17"
export CURSEFORGE_ENVIRONMENT="both"

java -jar mcreleaser.jar

Using System Properties

java -Dname="AwesomeMod" \
     -Dversion="4.2.0" \
     -Ddescription="Major update with new features" \
     -DcurseforgeToken="your-curseforge-token" \
     -DcurseforgeProject="123456" \
     -DcurseforgeType="minecraft" \
     -DcurseforgeReleaseType="release" \
     -DcurseforgeGameVersions="1.20.1 1.20.2 1.20.4" \
     -DcurseforgeModLoaders="fabric" \
     -DcurseforgeJavaVersion="17" \
     -DcurseforgeEnvironment="both" \
     -jar mcreleaser.jar

GitHub Actions Workflow

name: Release to CurseForge

on:
  release:
    types: [created]

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      
      - name: Set up JDK
        uses: actions/setup-java@v4
        with:
          java-version: '17'
          distribution: 'temurin'
      
      - name: Build
        run: ./gradlew build
      
      - name: Release to CurseForge
        env:
          NAME: ${{ github.event.repository.name }}
          VERSION: ${{ github.ref_name }}
          DESCRIPTION: ${{ github.event.release.body }}
          CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }}
          CURSEFORGE_PROJECT: "123456"
          CURSEFORGE_TYPE: "minecraft"
          CURSEFORGE_RELEASE_TYPE: "release"
          CURSEFORGE_GAME_VERSIONS: "1.20.1 1.20.2 1.20.4"
          CURSEFORGE_MOD_LOADERS: "fabric"
          CURSEFORGE_JAVA_VERSION: "17"
          CURSEFORGE_ENVIRONMENT: "both"
        run: java -jar mcreleaser.jar

Tips

  • Store your CURSEFORGE_TOKEN as a secret in your CI/CD system
  • The project ID is numeric and can be found in your project’s settings
  • Use the common GAME_VERSIONS variable to set versions for all platforms at once
  • CurseForge requires specific version strings - make sure they match CurseForge’s version format
  • The changelog will be taken from the common DESCRIPTION variable
  • Specify the Java version to help users understand compatibility requirements
  • Use relations to declare dependencies on other mods like JEI or Fabric API

Build docs developers (and LLMs) love