From 196a9b62770d07af416a5ae008c6045ec8638caf Mon Sep 17 00:00:00 2001 From: Puneet Behl Date: Sat, 16 Sep 2023 12:15:43 +0530 Subject: [PATCH] Update gradle.yml Append date to the uploaded artifact --- .github/workflows/gradle.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 9044a560c4..83924e2766 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -21,6 +21,8 @@ jobs: uses: actions/checkout@v2 with: token: ${{ secrets.GH_TOKEN }} + - name: Set current date as env variable + run: echo "NOW=$(date +'%Y-%m-%dT%H%M%S')" >> $GITHUB_ENV - uses: gradle/wrapper-validation-action@v1 - name: Set up JDK uses: actions/setup-java@v3 @@ -30,7 +32,7 @@ jobs: - name: Extract branch name if: success() id: extract_branch - run: echo "value=${GITHUB_REF:11}" >> $GITHUB_OUTPUT + run: echo "value=${GITHUB_BASE_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT - name: Build Documentation uses: gradle/gradle-build-action@v2 with: @@ -45,8 +47,8 @@ jobs: if: success() uses: actions/upload-artifact@v3 with: - name: grails-docs.zip - path: ./build/distributions/grails-docs-*.zip + name: grails-docs-${{ env.NOW }}.zip + path: ./build/distributions/grails-docs-*.*.zip - name: Determine docs target repository if: success() uses: haya14busa/action-cond@v1