Skip to content

Commit

Permalink
Prepare distribution on Modrinth
Browse files Browse the repository at this point in the history
  • Loading branch information
NotMyFault committed Aug 18, 2023
1 parent 72da5b4 commit 2ec09c5
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/announce-release-on-discord.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,7 @@ jobs:
""
"Click here to view changelog: https://github.com/IntellectualSites/plothider/releases/tag/${{ github.event.release.tag_name }}"
""
"The download is available at:"
"The primary download is available at Modrinth: <https://modrinth.com/plugin/holoplots/version/${{ github.event.release.tag_name }}>"
""
"An alternative download is available at:"
"- Spigot: <https://www.spigotmc.org/resources/20701/>"
4 changes: 4 additions & 0 deletions .github/workflows/upload-release-asset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@ jobs:
files: 'build/libs/plothider-*.jar'
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-tag: ${{ github.event.release.tag_name }}
- name: Upload to Modrinth
run: ./gradlew clean build modrinth publishAllPublicationsToHangar
env:
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
Binary file modified README.md
Binary file not shown.
19 changes: 18 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ plugins {

alias(libs.plugins.shadow)
alias(libs.plugins.pluginyml)
id("com.diffplug.spotless") version "6.20.0"
alias(libs.plugins.spotless)
alias(libs.plugins.minotaur)
}

java {
Expand Down Expand Up @@ -81,3 +82,19 @@ tasks.named<ShadowJar>("shadowJar") {
tasks.named("build").configure {
dependsOn("shadowJar")
}

val supportedVersions = listOf("1.16.5", "1.17.1", "1.18.2", "1.19", "1.19.1", "1.19.2", "1.19.3", "1.19.4", "1.20", "1.20.1")

modrinth {
token.set(System.getenv("MODRINTH_TOKEN"))
projectId.set("plothider")
versionName.set("${project.version}")
versionNumber.set("${project.version}")
versionType.set("release")
uploadFile.set(file("build/libs/${rootProject.name}-${project.version}.jar"))
gameVersions.addAll(supportedVersions)
loaders.addAll(listOf("paper", "purpur", "spigot"))
syncBodyFrom.set(rootProject.file("README.md").readText())
changelog.set("The changelog is available on GitHub: https://github" +
".com/IntellectualSites/plothider/releases/tag/${project.version}")
}
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ bstats = "3.0.0"
shadow = "8.1.1"
spotless = "6.20.0"
bukkityml = "0.6.0"
minotaur = "2.8.3"

[libraries]
# Plugins
Expand All @@ -20,3 +21,4 @@ protocollib = { group = "com.comphenix.protocol", name = "ProtocolLib", version.
shadow = { id = "com.github.johnrengelman.shadow", version.ref = "shadow" }
spotless = { id = "com.diffplug.spotless", version.ref = "spotless" }
pluginyml = { id = "net.minecrell.plugin-yml.bukkit", version.ref = "bukkityml" }
minotaur = { id = "com.modrinth.minotaur", version.ref = "minotaur" }

0 comments on commit 2ec09c5

Please sign in to comment.