Update SkyHawk-SHRP.yml

This commit is contained in:
ragebreaker 2024-08-16 06:21:39 +05:30 committed by GitHub
parent b8a9c4ba5a
commit 06fb3e12d4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -158,11 +158,28 @@ jobs:
lunch ${{ env.DEVICE_MAKEFILE }}-eng && make clean && mka ${{ github.event.inputs.BUILD_TARGET }} -j$(nproc --all) 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" 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 - name: Set Build Date # Output will be use in Release
run: | run: |
echo "BUILD_DATE=$(date +%Y%m%d)" >> $GITHUB_ENV echo "BUILD_DATE=$(date +%Y%m%d)" >> $GITHUB_ENV
- name: Upload to Release - name: Upload to Release
if: always() && env.CHECK_IMG_IS_OK = 'true'
uses: softprops/action-gh-release@master uses: softprops/action-gh-release@master
with: with:
files: | files: |