Skip to content

Commit 6f87b35

Browse files
committed
automated publishing
1 parent 04a5529 commit 6f87b35

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed

CHANGELOG.md

Whitespace-only changes.

build.gradle

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ plugins {
22
id "fabric-loom" version "1.6+"
33
id "com.github.johnrengelman.shadow" version "8.1+"
44
id "maven-publish"
5+
id "me.modmuss50.mod-publish-plugin" version "0.5.2"
56
}
67

78
version = project.mod_version
@@ -43,6 +44,45 @@ processResources {
4344
}
4445
}
4546

47+
publishMods {
48+
displayName = "ramel ${project.version}"
49+
file = remapJar.archiveFile
50+
changelog = rootProject.file("CHANGELOG.md").getText()
51+
type = STABLE
52+
53+
modLoaders.add("quilt")
54+
modLoaders.add("fabric")
55+
56+
dryRun = !providers.environmentVariable("MODRINTH_TOKEN").isPresent()
57+
|| !providers.environmentVariable("CURSEFORGE_TOKEN").isPresent()
58+
|| property("pub.should_publish") == "false"
59+
dryRun = false
60+
61+
var mcVersions = [project.minecraft_version]
62+
mcVersions.addAll(property("pub.additional_versions").toString().split(" ").findAll { !it.empty })
63+
64+
modrinth {
65+
projectId = "4Uw92C2y"
66+
accessToken = providers.environmentVariable("MODRINTH_TOKEN")
67+
mcVersions.forEach(minecraftVersions::add)
68+
69+
requires("fabric-api")
70+
optional("modmenu")
71+
}
72+
73+
curseforge {
74+
accessToken = providers.environmentVariable("CURSEFORGE_TOKEN")
75+
projectId = "877074"
76+
mcVersions.forEach(minecraftVersions::add)
77+
78+
clientRequired = true
79+
serverRequired = false
80+
81+
requires("fabric-api")
82+
optional("modmenu")
83+
}
84+
}
85+
4686
def targetJavaVersion = 17
4787
tasks.withType(JavaCompile).configureEach {
4888
it.options.encoding = "UTF-8"

gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ kaleido_config_version=0.3.1+1.3.2
1111
mod_version = 1.0.5+mc1.21.1
1212
maven_group = io.ix0rai
1313
archives_base_name = ramel
14+
15+
pub.should_publish = true
16+
pub.additional_versions = 1.21

0 commit comments

Comments
 (0)