Skip to content

Commit efe7f51

Browse files
committed
feat: modrinth action
1 parent 317dacd commit efe7f51

File tree

5 files changed

+65
-9
lines changed

5 files changed

+65
-9
lines changed

.github/workflows/release-dev.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,11 @@ jobs:
4040
id: commit_hash
4141
run: echo "COMMIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
4242

43-
# - name: Publish to SimpleCloud Repository
44-
# run: ./gradlew publishMavenJavaPublicationToSimplecloudRepository
45-
# env:
46-
# COMMIT_HASH: ${{ env.COMMIT_HASH }}
47-
# SIMPLECLOUD_USERNAME: ${{ secrets.SIMPLECLOUD_USERNAME }}
48-
# SIMPLECLOUD_PASSWORD: ${{ secrets.SIMPLECLOUD_PASSWORD }}
43+
- name: Publish to Modrinth
44+
run: ./gradlew modrinth && ./gradlew modrinthSyncBody
45+
env:
46+
COMMIT_HASH: ${{ env.COMMIT_HASH }}
47+
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
4948

5049
- name: Create Release
5150
id: create_release
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,35 @@
1+
plugins {
2+
alias(libs.plugins.minotaur)
3+
}
4+
15
dependencies {
26
api(project(":connection-shared"))
37
api("net.kyori:adventure-text-minimessage:4.16.0")
48
api("net.kyori:adventure-platform-bungeecord:4.3.2")
59
compileOnly("net.md-5:bungeecord-api:1.20-R0.2")
10+
}
11+
12+
modrinth {
13+
token.set(project.findProperty("modrinthToken") as String? ?: System.getenv("MODRINTH_TOKEN"))
14+
projectId.set("4Vw4Mgla")
15+
versionNumber.set(rootProject.version.toString())
16+
versionType.set("beta")
17+
uploadFile.set(tasks.shadowJar)
18+
gameVersions.addAll(
19+
"1.20",
20+
"1.20.1",
21+
"1.20.2",
22+
"1.20.3",
23+
"1.20.4",
24+
"1.20.5",
25+
"1.20.6",
26+
"1.21",
27+
"1.21.1",
28+
"1.21.2",
29+
"1.21.3",
30+
"1.21.4"
31+
)
32+
loaders.add("bungeecord")
33+
changelog.set("https://docs.simplecloud.app/changelog")
34+
syncBodyFrom.set(rootProject.file("README.md").readText())
635
}

connection-shared/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies {
66
api("org.spongepowered:configurate-yaml:4.0.0")
77
api("org.spongepowered:configurate-extra-kotlin:4.1.2")
88
api("commons-io:commons-io:2.15.1")
9-
api(rootProject.libs.simpleCloudPluginApi)
9+
api(rootProject.libs.simplecloud.plugin.api)
1010
}
1111

1212
tasks.named("shadowJar", ShadowJar::class) {
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,35 @@
11
plugins {
22
kotlin("kapt")
3+
alias(libs.plugins.minotaur)
34
}
45

56
dependencies {
67
api(project(":connection-shared"))
78
compileOnly("com.velocitypowered:velocity-api:3.3.0-SNAPSHOT")
89
kapt("com.velocitypowered:velocity-api:3.3.0-SNAPSHOT")
10+
}
11+
12+
modrinth {
13+
token.set(project.findProperty("modrinthToken") as String? ?: System.getenv("MODRINTH_TOKEN"))
14+
projectId.set("4Vw4Mgla")
15+
versionNumber.set(rootProject.version.toString())
16+
versionType.set("beta")
17+
uploadFile.set(tasks.shadowJar)
18+
gameVersions.addAll(
19+
"1.20",
20+
"1.20.1",
21+
"1.20.2",
22+
"1.20.3",
23+
"1.20.4",
24+
"1.20.5",
25+
"1.20.6",
26+
"1.21",
27+
"1.21.1",
28+
"1.21.2",
29+
"1.21.3",
30+
"1.21.4"
31+
)
32+
loaders.add("velocity")
33+
changelog.set("https://docs.simplecloud.app/changelog")
34+
syncBodyFrom.set(rootProject.file("README.md").readText())
935
}

gradle/libs.versions.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@
22
kotlin = "2.0.20"
33
shadow = "8.3.3"
44
sonatype-central-portal-publisher = "1.2.3"
5-
simpleCloudPlugin = "0.0.1-dev.feb0927"
5+
simplecloud-plugin = "0.0.1-dev.feb0927"
6+
minotaur = "2.8.7"
67

78
[libraries]
89
kotlin-jvm = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.ref = "kotlin" }
910
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
10-
simpleCloudPluginApi = { module = "app.simplecloud.plugin:plugin-shared", version.ref = "simpleCloudPlugin" }
11+
simplecloud-plugin-api = { module = "app.simplecloud.plugin:plugin-shared", version.ref = "simplecloud-plugin" }
1112

1213
[plugins]
1314
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
1415
shadow = { id = "com.gradleup.shadow", version.ref = "shadow" }
1516
sonatype-central-portal-publisher = { id = "net.thebugmc.gradle.sonatype-central-portal-publisher", version.ref = "sonatype-central-portal-publisher" }
17+
minotaur = { id = "com.modrinth.minotaur", version.ref = "minotaur" }

0 commit comments

Comments
 (0)