Skip to content

Commit

Permalink
Add task to print environment variables to a file.
Browse files Browse the repository at this point in the history
  • Loading branch information
anviaan committed Nov 30, 2024
1 parent 8300515 commit 00291ad
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,13 @@ subprojects {
tasks.withType<GenerateModuleMetadata>().configureEach {
enabled = false
}

tasks.register("printEnv") {
doLast {
val envFile = File(System.getenv("GITHUB_ENV"))
envFile.appendText("MOD_VERSION=$MOD_VERSION\n")
envFile.appendText("RELEASE_NAME=$ARCHIVE_NAME-$MOD_VERSION\n")
envFile.appendText("GAME_VERSIONS=$COMPATIBLE_VERSIONS\n")
}
}
}

0 comments on commit 00291ad

Please sign in to comment.