mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-08 23:51:21 +02:00
Fix CI workflows
This commit is contained in:
parent
a49cf401e5
commit
2256b8222c
2 changed files with 25 additions and 24 deletions
23
.github/workflows/main.yml
vendored
23
.github/workflows/main.yml
vendored
|
|
@ -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 |
|
||||||
# Wholphin-debug-0.2.9-62-g5c12e03-16-arm64-v8a.apk => Wholphin-debug-arm64-v8a.apk
|
while IFS= read -r -d '' line; do
|
||||||
short_name="$(echo $line | sed -E 's/-[0-9]+\.[0-9]+\.[0-9]+-[0-9]+-g[a-fA-F0-9]+-[0-9]+//')"
|
# Wholphin-debug-0.2.9-62-g5c12e03-16-arm64-v8a.apk => Wholphin-debug-arm64-v8a.apk
|
||||||
echo "$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]+//')"
|
||||||
cp "$line" "$short_name"
|
echo "$line => $short_name"
|
||||||
done <<< "${{ steps.build.outputs.apks }}"
|
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: 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:
|
||||||
|
|
|
||||||
26
.github/workflows/release.yml
vendored
26
.github/workflows/release.yml
vendored
|
|
@ -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:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue