Skip to content

Commit

Permalink
automated publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
ix0rai committed Sep 19, 2024
1 parent 04a5529 commit 6f87b35
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
Empty file added CHANGELOG.md
Empty file.
40 changes: 40 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ plugins {
id "fabric-loom" version "1.6+"
id "com.github.johnrengelman.shadow" version "8.1+"
id "maven-publish"
id "me.modmuss50.mod-publish-plugin" version "0.5.2"
}

version = project.mod_version
Expand Down Expand Up @@ -43,6 +44,45 @@ processResources {
}
}

publishMods {
displayName = "ramel ${project.version}"
file = remapJar.archiveFile
changelog = rootProject.file("CHANGELOG.md").getText()
type = STABLE

modLoaders.add("quilt")
modLoaders.add("fabric")

dryRun = !providers.environmentVariable("MODRINTH_TOKEN").isPresent()
|| !providers.environmentVariable("CURSEFORGE_TOKEN").isPresent()
|| property("pub.should_publish") == "false"
dryRun = false

var mcVersions = [project.minecraft_version]
mcVersions.addAll(property("pub.additional_versions").toString().split(" ").findAll { !it.empty })

modrinth {
projectId = "4Uw92C2y"
accessToken = providers.environmentVariable("MODRINTH_TOKEN")
mcVersions.forEach(minecraftVersions::add)

requires("fabric-api")
optional("modmenu")
}

curseforge {
accessToken = providers.environmentVariable("CURSEFORGE_TOKEN")
projectId = "877074"
mcVersions.forEach(minecraftVersions::add)

clientRequired = true
serverRequired = false

requires("fabric-api")
optional("modmenu")
}
}

def targetJavaVersion = 17
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
Expand Down
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ kaleido_config_version=0.3.1+1.3.2
mod_version = 1.0.5+mc1.21.1
maven_group = io.ix0rai
archives_base_name = ramel

pub.should_publish = true
pub.additional_versions = 1.21

0 comments on commit 6f87b35

Please sign in to comment.