Skip to content

Commit

Permalink
Test Getting Build File ID
Browse files Browse the repository at this point in the history
  • Loading branch information
IntegerLimit committed Mar 6, 2024
1 parent 8622e1d commit 9e3cba5
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions addon.gradle
Original file line number Diff line number Diff line change
@@ -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)
}
}
}

0 comments on commit 9e3cba5

Please sign in to comment.