@@ -18,6 +18,7 @@ plugins {
18
18
id " com.modrinth.minotaur" version " 2.+"
19
19
id ' net.minecraftforge.gradle' version ' [6.0,6.2)'
20
20
id ' org.parchmentmc.librarian.forgegradle' version ' 1.+'
21
+ id " me.hypherionmc.modutils.modpublisher" version " 1.+"
21
22
}
22
23
23
24
apply plugin : ' org.spongepowered.mixin'
@@ -328,7 +329,7 @@ build.dependsOn tasks.jarJar
328
329
329
330
// TODO: Should trigger automated publishes using GitHub actions when a release is made.
330
331
331
- if (modrinth_publish && (System . getenv(" MODRINTH_TOKEN" ) != null || project. hasProperty(' modrinthToken' ))) {
332
+ /* if (modrinth_publish && (System.getenv("MODRINTH_TOKEN") != null || project.hasProperty('modrinthToken'))) {
332
333
modrinth {
333
334
token = System.getenv("MODRINTH_TOKEN") ?: project.findProperty("modrinthToken")
334
335
projectId = "${modrinth_projectId}"
@@ -351,6 +352,25 @@ if (modrinth_publish && (System.getenv("MODRINTH_TOKEN") != null || project.hasP
351
352
optional.project "u6dRKJwZ"
352
353
}
353
354
}
355
+ }*/
356
+
357
+
358
+ publisher {
359
+ apiKeys {
360
+ curseforge = System . getenv(" CURSEFORGE_TOKEN" )
361
+ modrinth = System . getenv(" MODRINTH_TOKEN" )
362
+ }
363
+
364
+ debug = true // When enabled, no files will actually be uploaded
365
+ curseID = curseforge_projectId
366
+ modrinthID = modrinth_projectId
367
+ versionType = release_type
368
+ changelog = " "
369
+ version = " ${ getVersionString()} "
370
+ displayName = " Ender IO - ${ getVersionString()} "
371
+ gameVersions = [minecraft_version]
372
+ loaders = [" forge" ]
373
+ artifact = tasks. jarJar
354
374
}
355
375
356
376
publishing {
@@ -416,6 +436,10 @@ tasks.withType(JavaCompile).configureEach {
416
436
// * enderio-1.19.1-6.2.1-nightly-4 :: nightly build no. 4 for version 6.2.1
417
437
// * enderio-1.19.1-6.5.1-dev-c91c8ee6e :: dev (local) build for commit c91c8ee6e
418
438
String getVersionString () {
439
+ // We've configured TeamCity to give us build numbers;
440
+ if (System . getenv(' TEAMCITY_VERSION' ) != null )
441
+ return " ${ System.getenv('BUILD_NUMBER')} -${ project.release_type} "
442
+
419
443
def build_server = System . getenv(' CI' ) != null || System . getenv(' BUILD_NUMBER' ) != null
420
444
421
445
def version_patch_lc = project. version_patch
0 commit comments