feat: add auto script to deploy bot on mcsm

This commit is contained in:
2024-09-14 23:10:34 +08:00
parent 97ca10ae3e
commit 48c82a5c24
6 files changed
+272

No files matched your search

+9
View File
@@ -1,3 +1,4 @@
import buildsrc.MCSMDeploy
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
@@ -52,4 +53,12 @@ tasks.shadowJar {
"Manifest-Version" to "1.0"
)
}
}
tasks.register("deployBot") {
val apiKey = System.getenv("MCSM_API_KEY")
val apiUrl = System.getenv("MCSM_API_URL")
val daemonId = System.getenv("MCSM_DAEMON_ID")
val instanceId = System.getenv("MCSM_INSTANCE_ID")
MCSMDeploy(apiUrl, apiKey, daemonId, instanceId).deploy(file("build/libs/FancyBot-1.0.0-all.jar"))
}