diff --git a/.github/workflows/release-dev.yml b/.github/workflows/release-dev.yml index e96e3b9..565bd82 100644 --- a/.github/workflows/release-dev.yml +++ b/.github/workflows/release-dev.yml @@ -44,12 +44,11 @@ jobs: id: commit_hash run: echo "COMMIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV -# - name: Publish to SimpleCloud Repository -# run: ./gradlew publishMavenJavaPublicationToSimplecloudRepository -# env: -# COMMIT_HASH: ${{ env.COMMIT_HASH }} -# SIMPLECLOUD_USERNAME: ${{ secrets.SIMPLECLOUD_USERNAME }} -# SIMPLECLOUD_PASSWORD: ${{ secrets.SIMPLECLOUD_PASSWORD }} + - name: Publish to Modrinth + run: ./gradlew modrinth && ./gradlew modrinthSyncBody + env: + COMMIT_HASH: ${{ env.COMMIT_HASH }} + MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} - name: Create Release id: create_release diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index fefd8fe..9d96247 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -11,6 +11,8 @@ coroutine = "1.10.1" adventure = "4.18.0" +minotaur = "2.8.7" + [libraries] kotlin-jvm = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.ref = "kotlin" } kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" } @@ -40,4 +42,5 @@ adventure = ["adventure", "adventure-text-minimessage"] [plugins] kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } -shadow = { id = "com.gradleup.shadow", version.ref = "shadow" } \ No newline at end of file +shadow = { id = "com.gradleup.shadow", version.ref = "shadow" } +minotaur = { id = "com.modrinth.minotaur", version.ref = "minotaur" } \ No newline at end of file diff --git a/sign-paper/build.gradle.kts b/sign-paper/build.gradle.kts index 1db0e1e..e6655a9 100644 --- a/sign-paper/build.gradle.kts +++ b/sign-paper/build.gradle.kts @@ -1,3 +1,7 @@ +plugins { + alias(libs.plugins.minotaur) +} + dependencies { api(project(":sign-shared")) compileOnly(rootProject.libs.paper.api) @@ -15,3 +19,28 @@ tasks { relocate("com.google.protobuf", "app.simplecloud.relocate.protobuf") } } + +modrinth { + token.set(project.findProperty("modrinthToken") as String? ?: System.getenv("MODRINTH_TOKEN")) + projectId.set("M2XJERK4") + versionNumber.set(rootProject.version.toString()) + versionType.set("beta") + uploadFile.set(tasks.shadowJar) + gameVersions.addAll( + "1.20", + "1.20.1", + "1.20.2", + "1.20.3", + "1.20.4", + "1.20.5", + "1.20.6", + "1.21", + "1.21.1", + "1.21.2", + "1.21.3", + "1.21.4" + ) + loaders.add("paper") + changelog.set("https://docs.simplecloud.app/changelog") + syncBodyFrom.set(rootProject.file("README.md").readText()) +} \ No newline at end of file