Add Modrinth Upload

This commit is contained in:
zax71 2023-03-02 12:37:07 +00:00
parent 2b97f7310f
commit 2c5e86c689
3 changed files with 43 additions and 0 deletions

View File

@ -62,3 +62,22 @@ jobs:
file: build/libs/multiverse-core-${{ env.VERSION }}.jar
asset_name: multiverse-core-${{ steps.release.outputs.tag_name }}.jar
tag: ${{ steps.release.outputs.tag_name }}
- name: Get Changelog
id: changelog
uses: cardinalby/git-get-release-action@1.2.4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag: ${{ steps.release.outputs.tag_name }}
- name: Modrinth Upload
uses: gradle/gradle-build-action@v2
with:
arguments: modrinth
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
CHANGELOG: ${{ steps.changelog.outputs.body }}
PRERELEASE: ${{ steps.changelog.outputs.prerelease }}

View File

@ -5,6 +5,7 @@ plugins {
id 'maven-publish'
id 'checkstyle'
id 'com.github.johnrengelman.shadow' version '7.1.2'
id "com.modrinth.minotaur" version "2.+"
}
version = System.getenv('GITHUB_VERSION') ?: 'local'
@ -171,3 +172,20 @@ shadowJar {
build.dependsOn shadowJar
jar.enabled = false
modrinth {
token = System.getenv("MODRINTH_TOKEN")
projectId = "multiverse-core"
versionNumber = version
if(System.getenv("PRERELEASE")) {
versionType = "beta"
} else {
versionType = "release"
}
uploadFile = jar
gameVersions = ["1.19.2", "1.19.1", "1.19", "1.18.2", "1.18.1", "1.18", "1.17.1", "1.17", "1.16.5", "1.16.4", "1.16.3", "1.16.2", "1.16.1", "1.16"]
loaders = ["bukkit", "spigot", "paper", "purpur"]
changelog = System.getenv("CHANGELOG")
}

View File

@ -2,4 +2,10 @@
* This file was generated by the Gradle 'init' task.
*/
pluginManagement {
repositories {
gradlePluginPortal()
}
}
rootProject.name = 'multiverse-core'