A modern Gradle plugin to publish mods to a range of destinations.
Please make sure to report all issues, and any suggestions on this Github repo!
Visit the docs site for more detailed instructions.
Add to your gradle plugins block:
plugins {
id "me.modmuss50.mod-publish-plugin" version "0.8.0"
}
It is recommended to specify an exact version number to prevent unwanted breakages to your build script.
Basic example to publish a jar to CurseForge, Modrinth and Github from a Fabric project:
publishMods {
file = remapJar.archiveFile
changelog = "Hello!"
type = STABLE
modLoaders.add("fabric")
curseforge {
projectId = "123456"
projectSlug = "example-project" // Required for discord webhook
accessToken = providers.environmentVariable("CURSEFORGE_TOKEN")
minecraftVersions.add("1.20.1")
requires("fabric-api")
}
modrinth {
projectId = "abcdef"
accessToken = providers.environmentVariable("MODRINTH_TOKEN")
minecraftVersions.add("1.20.1")
}
github {
repository = "test/example"
accessToken = providers.environmentVariable("GITHUB_TOKEN")
commitish = "main"
}
discord {
webhookUrl = providers.environmentVariable("DISCORD_WEBHOOK")
}
}
Run the publishMods
task to publish to all configured destinations.
Visit the docs site for more detailed instructions.