File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5959 env :
6060 CURSEFORGE_KEY_SECRET : ${{ secrets.CURSEFORGE_KEY_SECRET }}
6161 run : ./gradlew curseforge
62+ - name : ' Deploy to Modrinth'
63+ if : startsWith(github.ref, 'refs/tags/')
64+ env :
65+ MODRINTH_KEY_SECRET : ${{ secrets.MODRINTH_KEY_SECRET }}
66+ run : ./gradlew modrinth
6267 - name : ' Create GitHub release'
6368 id : create_release
6469 if : startsWith(github.ref, 'refs/tags/')
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ buildscript {
1212plugins {
1313 id ' com.matthewprenger.cursegradle' version ' 1.4.0'
1414 id ' com.diffplug.spotless' version ' 5.14.3'
15+ id ' com.modrinth.minotaur' version ' 2.+'
1516}
1617
1718apply plugin : ' net.minecraftforge.gradle'
@@ -248,6 +249,28 @@ curseforge {
248249 }
249250}
250251
252+ modrinth {
253+ if (secrets. modrinth_key) {
254+ token = secrets. modrinth_key
255+ } else if (System . getenv(). GITHUB_ACTIONS && System . getenv(). MODRINTH_KEY_SECRET ) {
256+ token = System . getenv(). MODRINTH_KEY_SECRET
257+ } else {
258+ token = " DUMMY"
259+ }
260+ projectId = " GTi2kHAW"
261+ versionNumber = project. mod_version
262+ versionType = project. release_type
263+ uploadFile = jar
264+ gameVersions = [ project. minecraft_version ]
265+ changelog = " "
266+ if (new File (" resources/changelog/${ project.version} .txt" ). exists()) {
267+ changelog = new File (" resources/changelog/${ project.version} .txt" ). text
268+ }
269+ dependencies { // A special DSL for creating dependencies
270+ required. project " Z9DM0LJ4" // Cyclops Core
271+ }
272+ }
273+
251274publishing {
252275 repositories {
253276 if (project. hasProperty(" filesmaven_url" )) {
You can’t perform that action at this time.
0 commit comments