From 00585e33ac95cd700714d83340effdaab04cd1a2 Mon Sep 17 00:00:00 2001 From: trinsdar <30245301+Trinsdar@users.noreply.github.com> Date: Sun, 8 Dec 2024 11:57:36 -0500 Subject: [PATCH] updated nightly.yml, updated root build.gradle --- .github/workflows/nightly.yml | 4 ++-- build.gradle | 10 +++------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 622b4dd..2c51e67 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -31,11 +31,11 @@ jobs: server-id: github # Value of the distributionManagement/repository/id field of the pom.xml settings-path: ${{ github.workspace }} # location for the settings.xml file - name: Setup Gradle Dependencies Cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.gradle/caches ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle','**/gradle/wrapper/gradle-wrapper.properties','**/*.properties') }} + key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.properties') }} - name: Build with Gradle run: ./gradlew build --stacktrace # The USERNAME and TOKEN need to correspond to the credential environment variables used in diff --git a/build.gradle b/build.gradle index 68f70f3..f40d86c 100644 --- a/build.gradle +++ b/build.gradle @@ -4,8 +4,7 @@ plugins { id "fabric-loom" version "1.7-SNAPSHOT" apply false } -def isCI = System.getenv("GITHUB_ACTION") -def isRELEASE = System.getenv("GITHUB_RELEASE") +def isGITHU_ACTION = System.getenv("GITHUB_ACTION") def gitHash() { String hash = System.getenv("GITHUB_SHA") if (hash != null) return hash.substring(0,8) @@ -29,11 +28,8 @@ subprojects { it.options.encoding = 'UTF-8' } - if (isCI) { - if (!isRELEASE){ - version = version + "-" + gitHash() - println("Not in CI Release mode") - } + if (isGITHU_ACTION) { + version = version + "-" + gitHash() println("In CI mode") } } \ No newline at end of file