Skip to content

Commit

Permalink
Add environment variables to GITHUB_ENV file
Browse files Browse the repository at this point in the history
This commit adds three environment variables to the `GITHUB_ENV` file: `MOD_VERSION`, `RELEASE_NAME`, and `MINECRAFT_VERSION`.
  • Loading branch information
anviaan committed Nov 8, 2024
1 parent 396b9b4 commit 068a9c8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,10 @@ subprojects {

tasks.register("printEnv") {
doLast {
println("::set-env name=MOD_VERSION::$MOD_VERSION")
println("::set-env name=RELEASE_NAME::$ARCHIVE_NAME-$MOD_VERSION")
println("::set-env name=MINECRAFT_VERSION::$COMPATIBLE_VERSIONS")
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("MINECRAFT_VERSION=$COMPATIBLE_VERSIONS\n")
}
}
}

0 comments on commit 068a9c8

Please sign in to comment.