modmuss50 / mod-publish-plugin

A Gradle plugin to publish mods to a range of destinations

Home Page:https://modmuss50.github.io/mod-publish-plugin/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mod Publish Plugin

A modern Gradle plugin to publish mods to a range of destinations.

Please note this plugin is still under development, breaking changes may be made at anytime! Specify an exact version number to prevent unwanted breakages to your build script.

Please make sure to report all issues, and any suggestions on this Github repo!

Basic usage

Visit the docs site for more detailed instructions.

Add to your gradle plugins block:

plugins {
  id "me.modmuss50.mod-publish-plugin" version "0.5.1"
}

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.

About

A Gradle plugin to publish mods to a range of destinations

https://modmuss50.github.io/mod-publish-plugin/

License:MIT License


Languages

Language:Kotlin 100.0%