Merge pull request #2880 from Multiverse/modrinth-upload

feat: Add automatic Modrinth upload
This commit is contained in:
Jeremy Wood 2023-08-14 11:44:26 -04:00 committed by GitHub
commit befb2b54d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 41 additions and 0 deletions

View File

@ -62,3 +62,20 @@ 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:
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'
@ -176,3 +177,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.20.1", "1.20", "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", "1.15.2", "1.15.1", "1.15", "1.14.4", "1.14.3", "1.14.2", "1.14.1", "1.14", "1.13.2", "1.13.1", "1.13"]
loaders = ["bukkit", "spigot", "paper"]
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'