mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-08 23:51:21 +02:00
Split & update apks by ABI
This commit is contained in:
parent
5c12e03b6d
commit
62ab9b8398
5 changed files with 87 additions and 49 deletions
31
.github/workflows/main.yml
vendored
31
.github/workflows/main.yml
vendored
|
|
@ -15,8 +15,6 @@ concurrency:
|
|||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
APK_SHORT_NAME: Wholphin-release.apk
|
||||
APK_DEBUG_SHORT_NAME: Wholphin-debug.apk
|
||||
BRANCH_NAME: ${{ github.ref_name }}
|
||||
|
||||
jobs:
|
||||
|
|
@ -58,23 +56,26 @@ jobs:
|
|||
SIGNING_KEY: "${{ secrets.SIGNING_KEY }}"
|
||||
run: |
|
||||
./gradlew clean assembleRelease assembleDebug
|
||||
echo "apk=$(ls app/build/outputs/apk/release/Wholphin-release*.apk)" >> "$GITHUB_OUTPUT"
|
||||
echo "apk_debug=$(ls app/build/outputs/apk/debug/Wholphin-debug*.apk)" >> "$GITHUB_OUTPUT"
|
||||
- name: Verify signature
|
||||
echo "apks=$(find app/build/outputs/apk -name '*.apk' | sort)" >> "$GITHUB_OUTPUT"
|
||||
- name: Verify signatures
|
||||
run: |
|
||||
echo "Verify release APK"
|
||||
${{env.ANDROID_SDK_ROOT}}/build-tools/${{ env.BUILD_TOOLS_VERSION }}/apksigner verify --verbose --print-certs "${{ steps.build.outputs.apk }}"
|
||||
echo "Verify debug APK"
|
||||
${{env.ANDROID_SDK_ROOT}}/build-tools/${{ env.BUILD_TOOLS_VERSION }}/apksigner verify --verbose --print-certs "${{ steps.build.outputs.apk_debug }}"
|
||||
- name: Copy APK to ${{ env.APK_SHORT_NAME }}
|
||||
echo "Verify APK signatures"
|
||||
while IFS= read -r line; do
|
||||
${{env.ANDROID_SDK_ROOT}}/build-tools/${{ env.BUILD_TOOLS_VERSION }}/apksigner verify --verbose --print-certs "$line"
|
||||
done <<< "${{ steps.build.outputs.apks }}"
|
||||
- name: Copy APK to shorter names
|
||||
id: apks
|
||||
run: |
|
||||
cp "${{ steps.build.outputs.apk }}" "${{ env.APK_SHORT_NAME }}"
|
||||
cp "${{ steps.build.outputs.apk_debug }}" "${{ env.APK_DEBUG_SHORT_NAME }}"
|
||||
while IFS= read -r line; do
|
||||
# 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]+//')"
|
||||
echo "$line => $short_name"
|
||||
cp "$line" "$short_name"
|
||||
done <<< "${{ steps.build.outputs.apks }}"
|
||||
- name: Checksums
|
||||
run: |
|
||||
echo "SHA256 checksums:"
|
||||
sha256sum "${{ steps.build.outputs.apk }}" "${{ env.APK_SHORT_NAME }}"
|
||||
sha256sum "${{ steps.build.outputs.apk_debug }}" "${{ env.APK_DEBUG_SHORT_NAME }}"
|
||||
find app/build/outputs/apk -name '*.apk' | xargs sha256sum
|
||||
- name: Delete ${{ env.TAG_NAME }} tag and release
|
||||
uses: dev-drprasad/delete-tag-and-release@v1.1
|
||||
with:
|
||||
|
|
@ -99,7 +100,7 @@ jobs:
|
|||
with:
|
||||
allowUpdates: true
|
||||
artifactErrorsFailBuild: true
|
||||
artifacts: "${{ steps.build.outputs.apk_debug }},${{ steps.build.outputs.apk }},${{ env.APK_DEBUG_SHORT_NAME }},${{ env.APK_SHORT_NAME }}"
|
||||
artifacts: "${{ steps.apks.outputs.apks }}"
|
||||
draft: false
|
||||
generateReleaseNotes: false
|
||||
makeLatest: false
|
||||
|
|
|
|||
22
.github/workflows/release.yml
vendored
22
.github/workflows/release.yml
vendored
|
|
@ -37,21 +37,31 @@ jobs:
|
|||
SIGNING_KEY: "${{ secrets.SIGNING_KEY }}"
|
||||
run: |
|
||||
./gradlew clean assembleRelease
|
||||
echo "apk=$(ls app/build/outputs/apk/release/Wholphin-release*.apk)" >> "$GITHUB_OUTPUT"
|
||||
- name: Verify signature
|
||||
echo "apks=$(find app/build/outputs/apk -name '*.apk' | sort)" >> "$GITHUB_OUTPUT"
|
||||
- name: Verify signatures
|
||||
run: |
|
||||
${{env.ANDROID_SDK_ROOT}}/build-tools/${{ env.BUILD_TOOLS_VERSION }}/apksigner verify --verbose --print-certs "${{ steps.buildapp.outputs.apk }}"
|
||||
echo "Verify APK signatures"
|
||||
while IFS= read -r line; do
|
||||
${{env.ANDROID_SDK_ROOT}}/build-tools/${{ env.BUILD_TOOLS_VERSION }}/apksigner verify --verbose --print-certs "$line"
|
||||
done <<< "${{ steps.build.outputs.apks }}"
|
||||
|
||||
- name: Copy APK to ${{ env.APK_SHORT_NAME }}
|
||||
id: apks
|
||||
run: |
|
||||
cp "${{ steps.buildapp.outputs.apk }}" "${{ env.APK_SHORT_NAME }}"
|
||||
while IFS= read -r line; do
|
||||
short_name="$(echo $line | sed -E 's/-release-[0-9]+\.[0-9]+\.[0-9]+-[0-9]+-g[a-fA-F0-9]+-[0-9]+//')"
|
||||
echo "$line $short_name"
|
||||
cp "$line" "$short_name"
|
||||
done <<< "${{ steps.build.outputs.apks }}"
|
||||
echo "apks=$(find app/build/outputs/apk -name '*.apk' -print0 | tr '\0' ',' | sed 's/,$//')" >> "$GITHUB_OUTPUT"
|
||||
- name: Checksums
|
||||
run: |
|
||||
echo "SHA256 checksums:"
|
||||
sha256sum "${{ steps.buildapp.outputs.apk }}" "${{ env.APK_SHORT_NAME }}"
|
||||
find app/build/outputs/apk -name '*.apk' | xargs sha256sum
|
||||
- name: Create GitHub release
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
artifacts: "${{ steps.buildapp.outputs.apk }},${{ env.APK_SHORT_NAME }}"
|
||||
artifacts: "${{ steps.apks.outputs.apks }}"
|
||||
makeLatest: true
|
||||
prerelease: false
|
||||
generateReleaseNotes: false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue