mirror of
https://github.com/architectury/architectury-api.git
synced 2026-03-28 03:56:59 -05:00
Migrate to Unified Publishing (#274)
[norelease] to avoid empty release
* Migrate to Unified Publishing
* Proper changelog md
* Edit workflow
(cherry picked from commit 547f06f45e)
This commit is contained in:
2
.github/workflows/1.19_push.yml
vendored
2
.github/workflows/1.19_push.yml
vendored
@@ -73,4 +73,4 @@ jobs:
|
||||
CURSE_API_KEY: ${{ secrets.CURSE_API_KEY }}
|
||||
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
|
||||
with:
|
||||
arguments: publish curseforge modrinth --stacktrace --no-daemon
|
||||
arguments: publish publishUnified --stacktrace --no-daemon
|
||||
|
||||
@@ -10,8 +10,7 @@ plugins {
|
||||
id "architectury-plugin" version "3.4-SNAPSHOT"
|
||||
id "dev.architectury.loom" version "0.12.0-SNAPSHOT" apply false
|
||||
id "org.cadixdev.licenser" version "0.6.1"
|
||||
id "com.matthewprenger.cursegradle" version "1.4.0" apply false
|
||||
id "com.modrinth.minotaur" version "2.2.0" apply false
|
||||
id "me.shedaniel.unified-publishing" version "0.1.+" apply false
|
||||
id "maven-publish"
|
||||
}
|
||||
|
||||
@@ -98,12 +97,12 @@ allprojects {
|
||||
}
|
||||
def time = dateFormat.format(new Date())
|
||||
def changes = new StringBuilder()
|
||||
changes << "<h2>Architectury v$project.version for $project.supported_version</h2>Updated at <b>$time</b>.<br><a href=\"https://www.github.com/architectury/architectury/commits/$branch\">Click here for changelog</a>"
|
||||
changes << "## Architectury v$project.version for $project.supported_version\nUpdated at **$time**.\n[Click here for changelog](https://www.github.com/architectury/architectury/commits/$branch)"
|
||||
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 << "<br>- ${processedLine.capitalize()}"
|
||||
changes << "\n- ${processedLine.capitalize()}"
|
||||
}
|
||||
}
|
||||
proc.waitFor()
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
plugins {
|
||||
id "com.github.johnrengelman.shadow" version "7.1.2"
|
||||
id "com.matthewprenger.cursegradle"
|
||||
id "com.modrinth.minotaur"
|
||||
id "me.shedaniel.unified-publishing"
|
||||
}
|
||||
|
||||
loom {
|
||||
@@ -99,51 +98,37 @@ publishing {
|
||||
}
|
||||
}
|
||||
|
||||
curseforge {
|
||||
var CURSE_API_KEY = project.findProperty("CURSE_API_KEY") ?: System.getenv("CURSE_API_KEY")
|
||||
if (CURSE_API_KEY != null) {
|
||||
apiKey = CURSE_API_KEY
|
||||
project {
|
||||
id = rootProject.curseforge_id
|
||||
releaseType = "$rootProject.artifact_type"
|
||||
changelogType = "html"
|
||||
changelog = releaseChangelog()
|
||||
addGameVersion "1.19"
|
||||
addGameVersion "1.19-Snapshot"
|
||||
addGameVersion "Java 17"
|
||||
addGameVersion "Fabric"
|
||||
relations {
|
||||
requiredDependency "fabric-api"
|
||||
}
|
||||
mainArtifact(remapJar.archivePath) {
|
||||
displayName = "[Fabric $rootProject.supported_version] v$project.version"
|
||||
}
|
||||
afterEvaluate {
|
||||
uploadTask.dependsOn("build")
|
||||
}
|
||||
}
|
||||
}
|
||||
options {
|
||||
forgeGradleIntegration = false
|
||||
javaVersionAutoDetect = false
|
||||
}
|
||||
}
|
||||
|
||||
modrinth {
|
||||
var MODRINTH_TOKEN = project.findProperty("MODRINTH_TOKEN") ?: System.getenv("MODRINTH_TOKEN")
|
||||
if (MODRINTH_TOKEN != null) {
|
||||
token = MODRINTH_TOKEN
|
||||
projectId = rootProject.modrinth_id
|
||||
versionType = "$rootProject.artifact_type"
|
||||
versionNumber = "$project.version+$project.name"
|
||||
versionName = "[Fabric $rootProject.supported_version] v$project.version"
|
||||
unifiedPublishing {
|
||||
project {
|
||||
displayName = "[Fabric $rootProject.supported_version] v$project.version"
|
||||
releaseType = "$rootProject.artifact_type"
|
||||
changelog = releaseChangelog()
|
||||
uploadFile = remapJar
|
||||
gameVersions = ["1.19"]
|
||||
loaders = ["fabric", "quilt"]
|
||||
dependencies {
|
||||
// TODO: move to slugs if that functionality becomes available in minotaur
|
||||
required.project("P7dR8mSH") // Fabric API
|
||||
gameLoaders = ["fabric", "quilt"]
|
||||
mainPublication remapJar
|
||||
relations {
|
||||
depends {
|
||||
curseforge = "fabric-api"
|
||||
modrinth = "fabric-api"
|
||||
}
|
||||
}
|
||||
|
||||
var CURSE_API_KEY = project.findProperty("CURSE_API_KEY") ?: System.getenv("CURSE_API_KEY")
|
||||
if (CURSE_API_KEY != null) {
|
||||
curseforge {
|
||||
token = CURSE_API_KEY
|
||||
id = rootProject.curseforge_id
|
||||
gameVersions.addAll "Java 17", "1.19-Snapshot"
|
||||
}
|
||||
}
|
||||
|
||||
var MODRINTH_TOKEN = project.findProperty("MODRINTH_TOKEN") ?: System.getenv("MODRINTH_TOKEN")
|
||||
if (MODRINTH_TOKEN != null) {
|
||||
modrinth {
|
||||
token = MODRINTH_TOKEN
|
||||
id = rootProject.modrinth_id
|
||||
version = "$project.version+$project.name"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
plugins {
|
||||
id "com.github.johnrengelman.shadow" version "7.1.2"
|
||||
id "com.matthewprenger.cursegradle"
|
||||
id "com.modrinth.minotaur"
|
||||
id "me.shedaniel.unified-publishing"
|
||||
}
|
||||
|
||||
loom {
|
||||
@@ -112,45 +111,31 @@ publishing {
|
||||
}
|
||||
}
|
||||
|
||||
curseforge {
|
||||
var CURSE_API_KEY = project.findProperty("CURSE_API_KEY") ?: System.getenv("CURSE_API_KEY")
|
||||
if (CURSE_API_KEY != null) {
|
||||
apiKey = CURSE_API_KEY
|
||||
project {
|
||||
id = rootProject.curseforge_id
|
||||
releaseType = "$rootProject.artifact_type"
|
||||
changelogType = "html"
|
||||
changelog = releaseChangelog()
|
||||
addGameVersion "1.19"
|
||||
addGameVersion "Java 17"
|
||||
addGameVersion "Forge"
|
||||
mainArtifact(remapJar.archivePath) {
|
||||
displayName = "[Forge $rootProject.supported_version] v$project.version"
|
||||
}
|
||||
afterEvaluate {
|
||||
uploadTask.dependsOn("build")
|
||||
}
|
||||
}
|
||||
}
|
||||
options {
|
||||
forgeGradleIntegration = false
|
||||
javaVersionAutoDetect = false
|
||||
}
|
||||
}
|
||||
|
||||
modrinth {
|
||||
var MODRINTH_TOKEN = project.findProperty("MODRINTH_TOKEN") ?: System.getenv("MODRINTH_TOKEN")
|
||||
if (MODRINTH_TOKEN != null) {
|
||||
token = MODRINTH_TOKEN
|
||||
projectId = rootProject.modrinth_id
|
||||
versionType = "$rootProject.artifact_type"
|
||||
versionNumber = "$project.version+$project.name"
|
||||
versionName = "[Forge $rootProject.supported_version] v$project.version"
|
||||
unifiedPublishing {
|
||||
project {
|
||||
displayName = "[Forge $rootProject.supported_version] v$project.version"
|
||||
releaseType = "$rootProject.artifact_type"
|
||||
changelog = releaseChangelog()
|
||||
uploadFile = remapJar
|
||||
gameVersions = ["1.19"]
|
||||
loaders = ["forge"]
|
||||
dependencies {
|
||||
gameLoaders = ["forge"]
|
||||
mainPublication remapJar
|
||||
|
||||
var CURSE_API_KEY = project.findProperty("CURSE_API_KEY") ?: System.getenv("CURSE_API_KEY")
|
||||
if (CURSE_API_KEY != null) {
|
||||
curseforge {
|
||||
token = CURSE_API_KEY
|
||||
id = rootProject.curseforge_id
|
||||
gameVersions.addAll "Java 17"
|
||||
}
|
||||
}
|
||||
|
||||
var MODRINTH_TOKEN = project.findProperty("MODRINTH_TOKEN") ?: System.getenv("MODRINTH_TOKEN")
|
||||
if (MODRINTH_TOKEN != null) {
|
||||
modrinth {
|
||||
token = MODRINTH_TOKEN
|
||||
id = rootProject.modrinth_id
|
||||
version = "$project.version+$project.name"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ fabric_loader_version=0.14.6
|
||||
fabric_api_version=0.55.1+1.19
|
||||
mod_menu_version=3.1.0
|
||||
|
||||
forge_version=41.0.1
|
||||
forge_version=41.0.17
|
||||
|
||||
curseforge_id=419699
|
||||
modrinth_id=lhGA9TYQ
|
||||
Reference in New Issue
Block a user