File tree Expand file tree Collapse file tree 4 files changed +59
-15
lines changed Expand file tree Collapse file tree 4 files changed +59
-15
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish Release
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ release :
6
+ types :
7
+ - published
8
+
9
+ permissions :
10
+ contents : write
11
+
12
+ jobs :
13
+ Build :
14
+ runs-on : ubuntu-latest
15
+
16
+ steps :
17
+ - uses : actions/checkout@v4
18
+ - name : Set up JDK 21
19
+ uses : actions/setup-java@v4
20
+ with :
21
+ distribution : ' adopt'
22
+ java-version : 21
23
+ - name : Cache
24
+ uses : actions/cache@v4
25
+ with :
26
+ path : |
27
+ ~/.gradle/caches
28
+ ~/.gradle/wrapper
29
+ .gradle
30
+ key : ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'build.gradle') }}
31
+ - uses : gradle/actions/wrapper-validation@v3
32
+ - run : |
33
+ chmod +x gradlew
34
+ ./gradlew build publishMod --stacktrace -Porg.gradle.parallel.threads=4
35
+ env:
36
+ CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }}
37
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38
+ MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
Original file line number Diff line number Diff line change
1
+ ## Changelog
2
+ - port to 1.21.4 neoforge
Original file line number Diff line number Diff line change 1
1
plugins {
2
2
id(" dev.architectury.loom" ).version(" 1.9-SNAPSHOT" )
3
+ id(" com.hypherionmc.modutils.modpublisher" ).version(" 2.+" )
3
4
id(" maven-publish" )
4
5
}
5
6
@@ -60,18 +61,18 @@ tasks.withType<ProcessResources> {
60
61
}
61
62
}
62
63
63
- // tasks.register("copyJar") {
64
- // // Specify that this task runs after the 'build' task
65
- // dependsOn("build" )
66
- //
67
- // // Specify the task's action
68
- // doLast {
69
- // val destination = file("build/${archives_base_name}-${minecraft_version}-${mod_version}.jar ")
70
- // file("build/libs/litematica-printer.jar").copyTo(destination, true )
71
- // println("Copied output to ${destination.absolutePath} ")
72
- // }
73
- // }
74
- //
75
- // tasks.build {
76
- // finalizedBy("copyJar" )
77
- // }
64
+ publisher {
65
+ apiKeys.modrinth( System .getenv( " MODRINTH_TOKEN " ))
66
+ apiKeys.curseforge( System .getenv( " CURSEFORGE_TOKEN " ) )
67
+
68
+ curseID.set( " $project .curseforge_id " )
69
+ modrinthID.set( " $project .modrinth_id " )
70
+ versionType.set( " release " )
71
+ changelog.set( file(" CHANGELOG.md " ) )
72
+ displayName.set( " $project .version " )
73
+ gameVersions.set( listOf ( " 1.21.4 " ))
74
+ loaders.set( listOf (loom.platform.get().id()))
75
+ projectVersion.set( " $project .version " )
76
+ artifact.set( tasks.remapJar)
77
+ addAdditionalFile(tasks.remapSourcesJar )
78
+ }
Original file line number Diff line number Diff line change @@ -19,3 +19,6 @@ mappings_version = 1.21.4+build.8
19
19
yarn_patch =1.21+build.4
20
20
21
21
neoforge_version = 21.4.94-beta
22
+
23
+ curseforge_id =1223456
24
+ modrinth_id =oqw1j8E7
You can’t perform that action at this time.
0 commit comments