Selecting a Platform
To publish to a single platform, use thePLATFORMS environment variable (or -Dplatforms property for CLI) and specify one of the supported platforms:
github- GitHub Releasesmodrinth- Modrinthhangar- Hangar (PaperMC)polymart- Polymartcurseforge- CurseForge
Publishing to Modrinth
Here’s a complete example of publishing to Modrinth only:The
platforms parameter is case-insensitive, so modrinth, Modrinth, and MODRINTH all work.Publishing to GitHub Releases
Publishing to CurseForge
Platform-Specific Configuration
Each platform requires its own set of environment variables. Here’s a quick reference:Required Variables by Platform
| Platform | Required Variables |
|---|---|
| GitHub | GITHUB_TOKEN, GITHUB_REPOSITORY, GITHUB_REF |
| Modrinth | MODRINTH_TOKEN, MODRINTH_PROJECT, MODRINTH_GAME_VERSIONS, MODRINTH_LOADERS |
| Hangar | HANGAR_KEY, HANGAR_PROJECT, HANGAR_CHANNEL, HANGAR_GAME_VERSIONS |
| Polymart | POLYMART_KEY, POLYMART_RESOURCE |
| CurseForge | CURSEFORGE_TOKEN, CURSEFORGE_PROJECT |
Next Steps
Multiple Platforms
Learn how to publish to multiple platforms simultaneously
File Handling
Understand how to specify which files to upload