From 06fb3e12d47a790ef54caf159fd6f0f5f4dfa26a Mon Sep 17 00:00:00 2001 From: ragebreaker <125530737+mlm-games@users.noreply.github.com> Date: Fri, 16 Aug 2024 06:21:39 +0530 Subject: [PATCH] Update SkyHawk-SHRP.yml --- .github/workflows/SkyHawk-SHRP.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/SkyHawk-SHRP.yml b/.github/workflows/SkyHawk-SHRP.yml index 5ceb8d7..c2ee187 100644 --- a/.github/workflows/SkyHawk-SHRP.yml +++ b/.github/workflows/SkyHawk-SHRP.yml @@ -158,11 +158,28 @@ jobs: lunch ${{ env.DEVICE_MAKEFILE }}-eng && make clean && mka ${{ github.event.inputs.BUILD_TARGET }} -j$(nproc --all) echo "Done building your ${{ github.event.inputs.BUILD_TARGET }}.img" + - name: Check if the recovery exists + if: always() + run: | + if [ -f out/target/product/${{ env.DEVICE_NAME }}/OrangeFox*.img ]; then + echo "CHECK_IMG_IS_OK=true" >> $GITHUB_ENV + echo "MD5_IMG=$(md5sum out/target/product/${{ env.DEVICE_NAME }}/OrangeFox*.img | cut -d ' ' -f 1)" >> $GITHUB_ENV + else + echo "Recovery out directory is empty." + fi + if [ -f android-recovery/out/target/product/${{ github.event.inputs.DEVICE_NAME }}/${{ github.event.inputs.BUILD_TARGET }}.img ]; then + echo "CHECK_ZIP_IS_OK=true" >> $GITHUB_ENV + echo "MD5_ZIP=$(md5sum out/target/product/${{ github.event.inputs.DEVICE_NAME }}/pbrp*.zip | cut -d ' ' -f 1)" >> $GITHUB_ENV + else + echo "::warning::The zip file isn't present but make sure the image is from only after 100% completion in build stage" + fi + - name: Set Build Date # Output will be use in Release run: | echo "BUILD_DATE=$(date +%Y%m%d)" >> $GITHUB_ENV - name: Upload to Release + if: always() && env.CHECK_IMG_IS_OK = 'true' uses: softprops/action-gh-release@master with: files: |