diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4ef1632..0909719 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,16 +26,18 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@v3 + - name: Add SHORT_SHA env property with commit short sha + run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV + - name: Build with Gradle Wrapper run: ./gradlew shadowJar - - - name: Set BUILD_NUMBER - run: echo "BUILD_NUMBER=PR-${{ github.event.number }}-${{ github.sha }}" >> $GITHUB_ENV + env: + BUILD_NUMBER: 'PR-${{ github.event.number }}-${{ env.SHORT_SHA }}' - name: Upload build uses: actions/upload-artifact@v4.3.3 with: - name: 'DeluxeMenus build PR-${{ github.event.number }} (commit ${{ github.sha }})' + name: 'DeluxeMenus build PR-${{ github.event.number }}-commit ${{ env.SHORT_SHA }}' path: build/libs # NOTE: The Gradle Wrapper is the default and recommended way to run Gradle (https://docs.gradle.org/current/userguide/gradle_wrapper.html).