Skip to content

Commit

Permalink
Add conditions to configuration blocks to hopefully, finally, fix act…
Browse files Browse the repository at this point in the history
…ion builds
  • Loading branch information
Jaxydog committed Jun 13, 2024
1 parent 704f332 commit c592fe7
Showing 1 changed file with 33 additions and 29 deletions.
62 changes: 33 additions & 29 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -94,41 +94,45 @@ publishing {
}
}

githubRelease {
setToken(System.getenv("GITHUB_GRADLE_TOKEN") as String)

owner = "Jaxydog"
repo = "Lodestone"

tagName = mod_version
releaseName = "Lodestone ${mod_version}"
prerelease = !currentVersionType.equalsIgnoreCase("release")
body = currentChangelog
draft = false
releaseAssets = files(
remapJar.destinationDirectory.getAsFileTree().matching {
it.include("lodestone-${mod_version}*.jar")
}
)
if (System.getenv("GITHUB_GRADLE_TOKEN") != null) {
githubRelease {
token = System.getenv("GITHUB_GRADLE_TOKEN")

owner = "Jaxydog"
repo = "Lodestone"

tagName = mod_version
releaseName = "Lodestone ${mod_version}"
prerelease = !currentVersionType.equalsIgnoreCase("release")
body = currentChangelog
draft = false
releaseAssets = files(
remapJar.destinationDirectory.getAsFileTree().matching {
it.include("lodestone-${mod_version}*.jar")
}
)

dryRun = publish_debug.equalsIgnoreCase("true")
dryRun = publish_debug.equalsIgnoreCase("true")
}
}

modrinth {
token = System.getenv("MODRINTH_TOKEN")
projectId = project.modrinth_id
if (System.getenv("MODRINTH_TOKEN") != null) {
modrinth {
token = System.getenv("MODRINTH_TOKEN")
projectId = project.modrinth_id

versionName = "Lodestone ${project.mod_version}"
versionType = currentVersionType
gameVersions = [project.minecraft_version]
changelog = currentChangelog
versionName = "Lodestone ${project.mod_version}"
versionType = currentVersionType
gameVersions = [project.minecraft_version]
changelog = currentChangelog

uploadFile = remapJar
additionalFiles = [remapSourcesJar, javadocJar]
syncBodyFrom = rootProject.file("README.md").text
debugMode = project.publish_debug.equalsIgnoreCase("true")
uploadFile = remapJar
additionalFiles = [remapSourcesJar, javadocJar]
syncBodyFrom = rootProject.file("README.md").text
debugMode = project.publish_debug.equalsIgnoreCase("true")

dependencies {}
dependencies {}
}
}

@SuppressWarnings('ChangeToOperator')
Expand Down

0 comments on commit c592fe7

Please sign in to comment.