mirror of
https://codeberg.org/moonleay/Gimbal.git
synced 2025-04-11 08:54:15 +02:00
ci: first modrinth publishing test
Signed-off-by: moonleay <contact@moonleay.net>
This commit is contained in:
parent
46a3ff542b
commit
3dcdb83bed
2 changed files with 27 additions and 2 deletions
|
@ -27,3 +27,7 @@ jobs:
|
||||||
name: Upload
|
name: Upload
|
||||||
env:
|
env:
|
||||||
PACKAGE_REPO_KEY: ${{ secrets.PACKAGE_REPO_KEY }}
|
PACKAGE_REPO_KEY: ${{ secrets.PACKAGE_REPO_KEY }}
|
||||||
|
- run: ./gradlew modrinth
|
||||||
|
name: Publish to Modrinth
|
||||||
|
env:
|
||||||
|
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
|
||||||
|
|
|
@ -27,10 +27,12 @@ plugins {
|
||||||
`maven-publish`
|
`maven-publish`
|
||||||
eclipse
|
eclipse
|
||||||
id("org.jetbrains.gradle.plugin.idea-ext")
|
id("org.jetbrains.gradle.plugin.idea-ext")
|
||||||
|
id("com.modrinth.minotaur") version "2.+"
|
||||||
}
|
}
|
||||||
|
|
||||||
val mavenVersion = System.getenv("CI_COMMIT_TAG") ?: System.getenv("CI_COMMIT_SHORT_SHA")?.let { "$it-dev" }
|
val mavenVersion = System.getenv("GITHUB_REF_NAME") ?: System.getenv("GITHUB_REF_NAME")
|
||||||
?: "0.3.0" //"0.0.0-SNAPSHOT"
|
?.let { "$it-${project.ext["minecraft.version"] as String}" }
|
||||||
|
?: "0.0.0-${project.ext["minecraft.version"] as String}"
|
||||||
val modId: String by project
|
val modId: String by project
|
||||||
val modName: String by project
|
val modName: String by project
|
||||||
|
|
||||||
|
@ -204,6 +206,25 @@ publishing {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// build.gradle.kts
|
||||||
|
modrinth {
|
||||||
|
token.set(System.getenv("MODRINTH_TOKEN")) // Remember to have the MODRINTH_TOKEN environment variable set or else this will fail - just make sure it stays private!
|
||||||
|
projectId.set(modId) // This can be the project ID or the slug. Either will work!
|
||||||
|
versionNumber.set(System.getenv(mavenVersion)) // You don't need to set this manually. Will fail if Modrinth has this version already
|
||||||
|
versionType.set("alpha") // This is the default -- can also be `beta` or `alpha`
|
||||||
|
uploadFile.set(tasks.remapJar) // With Loom, this MUST be set to `remapJar` instead of `jar`!
|
||||||
|
gameVersions.addAll(listOf(project.ext["minecraft.version"] as String)) // Must be an array, even with only one version
|
||||||
|
loaders.add("fabric") // Must also be an array - no need to specify this if you're using Loom or ForgeGradle
|
||||||
|
dependencies { // A special DSL for creating dependencies
|
||||||
|
// scope.type
|
||||||
|
// The scope can be `required`, `optional`, `incompatible`, or `embedded`
|
||||||
|
// The type can either be `project` or `version`
|
||||||
|
required.project("fabric-api") // Creates a new required dependency on Fabric API
|
||||||
|
required.project("fabric-language-kotlin")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
rootProject.idea.project {
|
rootProject.idea.project {
|
||||||
this as ExtensionAware
|
this as ExtensionAware
|
||||||
configure<ProjectSettings> {
|
configure<ProjectSettings> {
|
||||||
|
|
Loading…
Add table
Reference in a new issue