mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-21 18:15:26 +01:00
Merge pull request #2880 from Multiverse/modrinth-upload
feat: Add automatic Modrinth upload
This commit is contained in:
commit
befb2b54d8
17
.github/workflows/release.yml
vendored
17
.github/workflows/release.yml
vendored
@ -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 }}
|
||||
|
18
build.gradle
18
build.gradle
@ -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")
|
||||
}
|
||||
|
@ -2,4 +2,10 @@
|
||||
* This file was generated by the Gradle 'init' task.
|
||||
*/
|
||||
|
||||
pluginManagement {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = 'multiverse-core'
|
||||
|
Loading…
Reference in New Issue
Block a user