diff --git a/build.gradle.kts b/build.gradle.kts index d640116..5f60eb7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,8 +13,8 @@ group = "com.github.creeper123123321.viafabric" val gitVersion: groovy.lang.Closure by extra val versionDetails: groovy.lang.Closure by extra -val travisBranch: String? = System.getenv("TRAVIS_BRANCH") // version details doesn't work on travis -val branch = if (!travisBranch.isNullOrBlank()) travisBranch else try { +val githubShaInfo: String? = System.getenv("GITHUB_SHA")?.substring(0, 10) // version details doesn't work on gh actions +val branch = if (!githubShaInfo.isNullOrBlank()) githubShaInfo else try { versionDetails().branchName } catch (e: Exception) { "unknown"