Skip to content

Commit

Permalink
Test New CurseForge Gradle Addition
Browse files Browse the repository at this point in the history
  • Loading branch information
IntegerLimit committed Mar 7, 2024
1 parent 5c402b6 commit 6b8a5bc
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -983,6 +983,29 @@ if (cfApiKey.isPresent() || deploymentDebug.toBoolean()) {
additionalFile.changelog = changelogRaw
}
}
doLast {
// No File IDs in Debug Mode
if (!deploymentDebug.toBoolean()) {
def list = [];
for (def artifact : tasks.curseforge.getUploadArtifacts()) {
list.add(artifact)
for (def additionalArtifact : artifact.getAdditionalArtifacts()) {
list.add(additionalArtifact)
}
}
def summary = "# CurseForge Build Summary"
for (def artifact : list) {
def fileId = artifact.getCurseFileId()
def fileName = artifact.getArtifact().getSingleFile().name
println("Uploaded File ${fileName}, With File ID: ${fileId}")
summary.concat("\n - File: ${fileName} | File ID: ${fileId}")
}
def stepSummary = providers.environmentVariable("GITHUB_STEP_SUMMARY")
if (stepSummary.isPresent()) {
file(stepSummary.get()).write(summary)
}
}
}
}
tasks.curseforge.dependsOn(build)
tasks.curseforge.dependsOn('generateChangelog')
Expand Down

0 comments on commit 6b8a5bc

Please sign in to comment.