Automatic upload using Unified Publishing

This commit is contained in:
Martin Prokoph
2024-02-22 15:01:05 +01:00
parent 41a4ddf633
commit f3fb019bca
4 changed files with 79 additions and 20 deletions

View File

@@ -1,6 +1,7 @@
plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "1.5-SNAPSHOT" apply false
id "me.shedaniel.unified-publishing" version "0.1.+" apply false
}
architectury {
@@ -50,6 +51,21 @@ allprojects {
options.encoding = "UTF-8"
options.release = 17
}
ext {
releaseChangelog = {
def changes = new StringBuilder()
changes << "## CullLeaves v$project.version for $project.minecraft_version\n[View the changelog](https://www.github.com/TeamMidnightDust/CullLeaves/commits/)"
def proc = "git log --max-count=200 --pretty=format:%s".execute()
proc.in.eachLine { line ->
def processedLine = line.toString()
if (!processedLine.contains("New translations") && !processedLine.contains("Merge") && !processedLine.contains("branch")) {
changes << "\n- ${processedLine.capitalize()}"
}
}
proc.waitFor()
return changes.toString()
}
}
java {
withSourcesJar()