diff --git a/build.gradle b/build.gradle index 9a57ffb..5a5f774 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,7 @@ plugins { id 'fabric-loom' version '1.8-SNAPSHOT' id 'maven-publish' + id 'me.modmuss50.mod-publish-plugin' version '0.6.3' } version = project.mod_version + "+" + project.minecraft_version @@ -62,10 +63,54 @@ jar { } } +publishMods { + file = remapJar.archiveFile + additionalFiles.from(remapSourcesJar.archiveFile) + changelog = file("changelog.md").text + type = STABLE + modLoaders.add("fabric") + modLoaders.add("quilt") + displayName = project.version.toString() + dryRun = providers.environmentVariable("GITHUB_TOKEN").getOrNull() == null || providers.environmentVariable("MODRINTH_TOKEN").getOrNull() == null || providers.environmentVariable("CURSEFORGE_TOKEN").getOrNull() == null + + github { + repository = "Provismet/${project.github_repo}" + accessToken = providers.environmentVariable("GITHUB_TOKEN") + commitish = "${project.github_branch}" + tagName = "${project.mod_version}-mc${project.minecraft_version}" + allowEmptyFiles = true + displayName = "${project.mod_version} - ${project.minecraft_version}" + } + + modrinth { + projectId = project.modrinth_id + accessToken = providers.environmentVariable("MODRINTH_TOKEN") + minecraftVersionRange { + start = project.version_start + end = project.version_end + } + requires("fabric-api") + } + + curseforge { + projectId = project.curseforge_id + accessToken = providers.environmentVariable("CURSEFORGE_TOKEN") + clientRequired = true + serverRequired = false + minecraftVersionRange { + start = project.version_start + end = project.version_end + } + requires("fabric-api") + } +} + // configure the maven publication publishing { publications { mavenJava(MavenPublication) { + version = project.mod_version + "-mc" + project.minecraft_version + artifactId = project.archives_base_name from components.java } } diff --git a/changelog.md b/changelog.md new file mode 100644 index 0000000..666dd16 --- /dev/null +++ b/changelog.md @@ -0,0 +1 @@ +Updated to 1.21.3. \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 970c38e..d8072e2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,3 +17,11 @@ archives_base_name=vmc-mc fabric_version=0.110.0+1.21.3 cloth_version=16.0.141 modmenu_version=12.0.0-beta.1 + +# Publishing +github_repo=VMC-MC +github_branch=1.21.2 +modrinth_id=ub8B8TcT +curseforge_id=922189 +version_start=1.21.2 +version_end=1.21.3 \ No newline at end of file