Move to custom curse forge publish plugin
This commit is contained in:
parent
4d61bb4481
commit
e6fc735bea
4 changed files with 33 additions and 52 deletions
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
|
@ -27,7 +27,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
context: changelog
|
context: changelog
|
||||||
workflow_id: release.yml
|
workflow_id: release.yml
|
||||||
- run: ./gradlew checkVersion build publish curseforge github --stacktrace -x test
|
- run: ./gradlew checkVersion build publish publishMods github --stacktrace -x test
|
||||||
env:
|
env:
|
||||||
RELEASE_CHANNEL: ${{ github.event.inputs.channel }}
|
RELEASE_CHANNEL: ${{ github.event.inputs.channel }}
|
||||||
MAVEN_URL: ${{ secrets.MAVEN_URL }}
|
MAVEN_URL: ${{ secrets.MAVEN_URL }}
|
||||||
|
|
|
@ -1,37 +1,9 @@
|
||||||
apply plugin: "com.matthewprenger.cursegradle"
|
|
||||||
|
|
||||||
group = 'RebornCore'
|
group = 'RebornCore'
|
||||||
|
|
||||||
loom {
|
loom {
|
||||||
accessWidenerPath = file("src/main/resources/reborncore.accesswidener")
|
accessWidenerPath = file("src/main/resources/reborncore.accesswidener")
|
||||||
}
|
}
|
||||||
|
|
||||||
def ENV = System.getenv()
|
|
||||||
|
|
||||||
curseforge {
|
|
||||||
if (ENV.CURSEFORGE_API_KEY) {
|
|
||||||
apiKey = ENV.CURSEFORGE_API_KEY
|
|
||||||
}
|
|
||||||
|
|
||||||
project {
|
|
||||||
id = "237903"
|
|
||||||
changelog = ENV.CHANGELOG ?: "No changelog provided"
|
|
||||||
releaseType = ENV.RELEASE_CHANNEL ?: "release"
|
|
||||||
addGameVersion "1.20.1"
|
|
||||||
addGameVersion "Fabric"
|
|
||||||
|
|
||||||
mainArtifact(file("${project.buildDir}/libs/${archivesBaseName}-${version}.jar"))
|
|
||||||
|
|
||||||
afterEvaluate {
|
|
||||||
uploadTask.dependsOn("remapJar")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
options {
|
|
||||||
forgeGradleIntegration = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
def rcAw = file("src/main/resources/reborncore.accesswidener")
|
def rcAw = file("src/main/resources/reborncore.accesswidener")
|
||||||
def trAw = rootProject.file("src/main/resources/techreborn.accesswidener")
|
def trAw = rootProject.file("src/main/resources/techreborn.accesswidener")
|
||||||
|
|
||||||
|
|
47
build.gradle
47
build.gradle
|
@ -13,7 +13,7 @@ plugins {
|
||||||
id 'maven-publish'
|
id 'maven-publish'
|
||||||
id 'com.diffplug.spotless' version '6.19.0'
|
id 'com.diffplug.spotless' version '6.19.0'
|
||||||
id 'fabric-loom' version '1.3-SNAPSHOT'
|
id 'fabric-loom' version '1.3-SNAPSHOT'
|
||||||
id 'com.matthewprenger.cursegradle' version '1.4.0'
|
id 'me.modmuss50.mod-publish-plugin' version '0.0.1'
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
|
@ -339,30 +339,39 @@ tasks.register('copyTranslationsToGenerated', Copy) {
|
||||||
into file('src/main/generated')
|
into file('src/main/generated')
|
||||||
}
|
}
|
||||||
|
|
||||||
curseforge {
|
publishMods {
|
||||||
if (ENV.CURSEFORGE_API_KEY) {
|
|
||||||
apiKey = ENV.CURSEFORGE_API_KEY
|
|
||||||
}
|
|
||||||
|
|
||||||
project {
|
|
||||||
id = "233564"
|
|
||||||
changelog = ENV.CHANGELOG ?: "No changelog provided"
|
changelog = ENV.CHANGELOG ?: "No changelog provided"
|
||||||
releaseType = ENV.RELEASE_CHANNEL ?: "release"
|
version = project.version
|
||||||
addGameVersion "1.20.1" // Also update in RebornCore/build.gradle
|
type = ENV.RELEASE_CHANNEL == "release" ? STABLE : BETA
|
||||||
addGameVersion "Fabric"
|
modLoaders.add("fabric")
|
||||||
|
dryRun = ENV.CURSEFORGE_API_KEY == null
|
||||||
|
|
||||||
mainArtifact remapJar
|
def options = curseforgeOptions {
|
||||||
relations {
|
accessToken = providers.environmentVariable("CURSEFORGE_API_KEY")
|
||||||
requiredDependency 'reborncore'
|
minecraftVersions.add("1.20.1")
|
||||||
}
|
|
||||||
|
|
||||||
afterEvaluate {
|
requires {
|
||||||
uploadTask.dependsOn("remapJar")
|
slug = "fabric-api"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
options {
|
curseforge("curseforgeTechReborn") {
|
||||||
forgeGradleIntegration = false
|
from options
|
||||||
|
projectId = "233564"
|
||||||
|
file = remapJar.archiveFile
|
||||||
|
|
||||||
|
requires {
|
||||||
|
slug = "reborncore"
|
||||||
|
}
|
||||||
|
optional {
|
||||||
|
slug = "roughly-enough-items"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
curseforge("curseforgeRebornCore") {
|
||||||
|
from options
|
||||||
|
projectId = "237903"
|
||||||
|
file = project(":RebornCore").tasks.remapJar.archiveFile
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ org.gradle.jvmargs=-Xmx2G
|
||||||
fabric.loom.multiProjectOptimisation=true
|
fabric.loom.multiProjectOptimisation=true
|
||||||
|
|
||||||
# Mod properties
|
# Mod properties
|
||||||
mod_version=5.8.3
|
mod_version=5.8.4
|
||||||
|
|
||||||
# Fabric Properties
|
# Fabric Properties
|
||||||
# check these on https://modmuss50.me/fabric.html
|
# check these on https://modmuss50.me/fabric.html
|
||||||
|
|
Loading…
Add table
Reference in a new issue