diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..f028ce9 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,27 @@ +image: gradle:alpine + +variables: + GRADLE_OPTS: "-Dorg.gradle.daemon=false" + +before_script: + - export GRADLE_USER_HOME=`pwd`/.gradle + +build_test: + stage: deploy + script: + - gradle --build-cache assemble + - cp build/libs/* ./ + - rm *-dev.jar + - mv *.jar latest.jar + artifacts: + paths: + - build/libs + - latest.jar + only: + - master + +deploy: + stage: deploy + when: manual + script: + - gradle --build-cache publishModrinth \ No newline at end of file diff --git a/build.gradle b/build.gradle index a53ecc8..2587bb6 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,7 @@ plugins { id 'fabric-loom' version '0.5-SNAPSHOT' id 'maven-publish' + id "com.modrinth.minotaur" version "1.1.0" } sourceCompatibility = JavaVersion.VERSION_1_8 @@ -56,23 +57,18 @@ jar { from "LICENSE" } -// configure the maven publication -publishing { - publications { - mavenJava(MavenPublication) { - // add all the jars that should be included when publishing to maven - artifact(remapJar) { - builtBy remapJar - } - artifact(sourcesJar) { - builtBy remapSourcesJar - } - } - } +import com.modrinth.minotaur.TaskModrinthUpload - // select the repositories you want to publish to - repositories { - // uncomment to publish to the local maven - // mavenLocal() +task publishModrinth (type: TaskModrinthUpload){ + token = System.getenv("MODRINTH_API_TOKEN") // Use an environment property! + projectId = 'kVAQyCLX' + versionNumber = "${project.mod_version}" + uploadFile = remapJar // This is the java jar task + addGameVersion("${project.minecraft_version}") + addLoader('fabric') + versionName = "[${project.minecraft_version}] ${project.mod_version}" + afterEvaluate { + tasks.publishModrinth.dependsOn(remapJar) + tasks.publishModrinth.dependsOn(sourcesJar) } } diff --git a/src/main/resources/assets/resclone/icon.png b/src/main/resources/assets/resclone/icon.png new file mode 100644 index 0000000..2e84d5c Binary files /dev/null and b/src/main/resources/assets/resclone/icon.png differ