Update PitchBlack-PBRP.yml

This commit is contained in:
ragebreaker 2024-08-15 22:22:08 +05:30 committed by GitHub
parent a50f828138
commit 571a783936
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -156,6 +156,21 @@ jobs:
- name: Set Build Date # Needed for gh-releases - name: Set Build Date # Needed for gh-releases
run: | run: |
echo "BUILD_DATE=$(date +%Y%m%d)" >> $GITHUB_ENV echo "BUILD_DATE=$(date +%Y%m%d)" >> $GITHUB_ENV
- name: Check if Recovery Exist
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 "Recovery out directory is empty."
fi
- name: Generate Build Statistics - name: Generate Build Statistics
if: always() if: always()
@ -165,12 +180,13 @@ jobs:
- name: Upload Build Statistics - name: Upload Build Statistics
if: always() if: always()
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: build-stats name: build-stats
path: build-stats.txt path: build-stats.txt
- name: Upload to Release - name: Upload to Release
if: env.CHECK_IMG_IS_OK == 'true'
uses: softprops/action-gh-release@master uses: softprops/action-gh-release@master
with: with:
files: | files: |