Fix CI workflows

This commit is contained in:
Damontecres 2025-11-16 17:41:43 -05:00
parent a49cf401e5
commit 2256b8222c
No known key found for this signature in database
2 changed files with 25 additions and 24 deletions

View file

@ -56,26 +56,27 @@ jobs:
SIGNING_KEY: "${{ secrets.SIGNING_KEY }}" SIGNING_KEY: "${{ secrets.SIGNING_KEY }}"
run: | run: |
./gradlew clean assembleRelease assembleDebug ./gradlew clean assembleRelease assembleDebug
echo "apks=$(find app/build/outputs/apk -name '*.apk' | sort)" >> "$GITHUB_OUTPUT"
- name: Verify signatures - name: Verify signatures
run: | run: |
echo "Verify APK signatures" echo "Verify APK signatures"
while IFS= read -r line; do find app/build/outputs/apk -name '*.apk'
${{env.ANDROID_SDK_ROOT}}/build-tools/${{ env.BUILD_TOOLS_VERSION }}/apksigner verify --verbose --print-certs "$line" find app/build/outputs/apk -name '*.apk' -print0 | xargs -t -0 -n1 ${{env.ANDROID_SDK_ROOT}}/build-tools/${{ env.BUILD_TOOLS_VERSION }}/apksigner verify --verbose --print-certs
done <<< "${{ steps.build.outputs.apks }}"
- name: Copy APK to shorter names - name: Copy APK to shorter names
id: apks id: apks
run: | run: |
while IFS= read -r line; do find app/build/outputs/apk -name '*.apk' -print0 |
while IFS= read -r -d '' line; do
# Wholphin-debug-0.2.9-62-g5c12e03-16-arm64-v8a.apk => Wholphin-debug-arm64-v8a.apk # Wholphin-debug-0.2.9-62-g5c12e03-16-arm64-v8a.apk => Wholphin-debug-arm64-v8a.apk
short_name="$(echo $line | sed -E 's/-[0-9]+\.[0-9]+\.[0-9]+-[0-9]+-g[a-fA-F0-9]+-[0-9]+//')" short_name="$(echo $line | sed -E 's/-[0-9]+\.[0-9]+\.[0-9]+-[0-9]+-g[a-fA-F0-9]+-[0-9]+//')"
echo "$line => $short_name" echo "$line => $short_name"
cp "$line" "$short_name" cp "$line" "$short_name"
done <<< "${{ steps.build.outputs.apks }}" done
apks=$(find app/build/outputs/apk -name '*.apk' -print0 | tr '\0' ',' | sed 's/,$//')
echo "apks=$apks" >> "$GITHUB_OUTPUT"
- name: Checksums - name: Checksums
run: | run: |
echo "SHA256 checksums:" echo "SHA256 checksums:"
find app/build/outputs/apk -name '*.apk' | xargs sha256sum find app/build/outputs/apk -name '*.apk' -print0 | xargs -0 sha256sum
- name: Delete ${{ env.TAG_NAME }} tag and release - name: Delete ${{ env.TAG_NAME }} tag and release
uses: dev-drprasad/delete-tag-and-release@v1.1 uses: dev-drprasad/delete-tag-and-release@v1.1
with: with:

View file

@ -37,27 +37,27 @@ jobs:
SIGNING_KEY: "${{ secrets.SIGNING_KEY }}" SIGNING_KEY: "${{ secrets.SIGNING_KEY }}"
run: | run: |
./gradlew clean assembleRelease ./gradlew clean assembleRelease
echo "apks=$(find app/build/outputs/apk -name '*.apk' | sort)" >> "$GITHUB_OUTPUT"
- name: Verify signatures - name: Verify signatures
run: | run: |
echo "Verify APK signatures" echo "Verify APK signatures"
while IFS= read -r line; do find app/build/outputs/apk -name '*.apk'
${{env.ANDROID_SDK_ROOT}}/build-tools/${{ env.BUILD_TOOLS_VERSION }}/apksigner verify --verbose --print-certs "$line" find app/build/outputs/apk -name '*.apk' -print0 | xargs -0 -n1 ${{env.ANDROID_SDK_ROOT}}/build-tools/${{ env.BUILD_TOOLS_VERSION }}/apksigner verify --verbose --print-certs
done <<< "${{ steps.build.outputs.apks }}" - name: Copy APK to shorter names
- name: Copy APK to ${{ env.APK_SHORT_NAME }}
id: apks id: apks
run: | run: |
while IFS= read -r line; do find app/build/outputs/apk -name '*.apk' -print0 |
short_name="$(echo $line | sed -E 's/-release-[0-9]+\.[0-9]+\.[0-9]+-[0-9]+-g[a-fA-F0-9]+-[0-9]+//')" while IFS= read -r -d '' line; do
echo "$line $short_name" # Wholphin-debug-0.2.9-62-g5c12e03-16-arm64-v8a.apk => Wholphin-debug-arm64-v8a.apk
cp "$line" "$short_name" short_name="$(echo $line | sed -E 's/-[0-9]+\.[0-9]+\.[0-9]+-[0-9]+-g[a-fA-F0-9]+-[0-9]+//')"
done <<< "${{ steps.build.outputs.apks }}" echo "$line => $short_name"
echo "apks=$(find app/build/outputs/apk -name '*.apk' -print0 | tr '\0' ',' | sed 's/,$//')" >> "$GITHUB_OUTPUT" #cp "$line" "$short_name"
done
apks=$(find app/build/outputs/apk -name '*.apk' -print0 | tr '\0' ',' | sed 's/,$//')
echo "apks=$apks" >> "$GITHUB_OUTPUT"
- name: Checksums - name: Checksums
run: | run: |
echo "SHA256 checksums:" echo "SHA256 checksums:"
find app/build/outputs/apk -name '*.apk' | xargs sha256sum find app/build/outputs/apk -name '*.apk' -print0 | xargs -0 sha256sum
- name: Create GitHub release - name: Create GitHub release
uses: ncipollo/release-action@v1 uses: ncipollo/release-action@v1
with: with: