diff --git a/addon.gradle b/addon.gradle new file mode 100644 index 00000000..ee2a3191 --- /dev/null +++ b/addon.gradle @@ -0,0 +1,15 @@ +if (tasks.names.contains('curseforge')) { + tasks.curseforge.doLast { + tasks.curseforge.property("mainArtifact") + def fileID = (tasks.named("curseforge${curseForgeProjectId}").properties.get("mainArtifact"))['fileID'] + + println("Uploaded Main File With ID: ${fileID}") + + def summary = "# CurseForge Build Summary:\nBuilt to File ID: ${fileID}" + + def stepSummary = providers.environmentVariable("GITHUB_STEP_SUMMARY") + if (stepSummary.isPresent()) { + file(stepSummary.get()).write(summary) + } + } +} \ No newline at end of file