Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .github/workflows/apk-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,26 +87,26 @@ jobs:
} > android/key.properties
chmod 600 android/key.properties android/app/upload-keystore.jks

- name: Build original ABI-split APKs
- name: Build original ARM64 APK
run: |
flutter build apk --release --split-per-abi --obfuscate \
flutter build apk --release --target-platform android-arm64 --split-per-abi --obfuscate \
--split-debug-info=build/app/outputs/symbols --no-tree-shake-icons

- name: Verify identity, signing, architectures and checksums
- name: Verify identity, signing, ARM64 and checksums
shell: bash
run: |
set -euo pipefail
APKSIGNER="$(find "$ANDROID_HOME/build-tools" -name apksigner -type f | sort -V | tail -n1)"
AAPT="$(find "$ANDROID_HOME/build-tools" -name aapt -type f | sort -V | tail -n1)"
test -x "$APKSIGNER" && test -x "$AAPT"
mkdir -p dist
for ABI in arm64-v8a armeabi-v7a x86_64; do
APK="build/app/outputs/flutter-apk/app-${ABI}-release.apk"
test -s "$APK"
"$APKSIGNER" verify --print-certs "$APK"
"$AAPT" dump badging "$APK" | grep -Fq "package: name='com.rubex.nfile'"
cp "$APK" "dist/NFile-original-v${APP_VERSION}-${ABI}.apk"
done
APK="build/app/outputs/flutter-apk/app-arm64-v8a-release.apk"
test -s "$APK"
ABIS="$(unzip -Z1 "$APK" | sed -n 's#^lib/\([^/]*\)/.*#\1#p' | sort -u)"
test "$ABIS" = arm64-v8a || { echo "Unexpected ABI(s): $ABIS"; exit 1; }
"$APKSIGNER" verify --print-certs "$APK"
"$AAPT" dump badging "$APK" | grep -Fq "package: name='com.rubex.nfile'"
cp "$APK" "dist/NFile-original-v${APP_VERSION}-arm64-v8a.apk"
(cd dist && sha256sum ./*.apk > SHA256SUMS.txt)
cat dist/SHA256SUMS.txt

Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,14 @@ jobs:
echo "Keystore secrets not found, skipping cryptographic signing setup."
fi

- name: Build Split APKs
- name: Build ARM64 APK
if: steps.check_release.outputs.exists == 'false'
run: flutter build apk --release --split-per-abi --obfuscate --split-debug-info=build/app/outputs/symbols --no-tree-shake-icons
run: flutter build apk --release --target-platform android-arm64 --split-per-abi --obfuscate --split-debug-info=build/app/outputs/symbols --no-tree-shake-icons

- name: Rename APKs
if: steps.check_release.outputs.exists == 'false'
run: |
mv build/app/outputs/flutter-apk/app-arm64-v8a-release.apk build/app/outputs/flutter-apk/NFile-${{ env.APP_VERSION }}-arm64-v8a.apk
mv build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk build/app/outputs/flutter-apk/NFile-${{ env.APP_VERSION }}-armeabi-v7a.apk
mv build/app/outputs/flutter-apk/app-x86_64-release.apk build/app/outputs/flutter-apk/NFile-${{ env.APP_VERSION }}-x86_64.apk

- name: Upload APKs to Artifacts
if: steps.check_release.outputs.exists == 'false'
Expand All @@ -131,7 +129,7 @@ jobs:
name: "NFile Release ${{ env.APP_VERSION }}"
body: |
### Official NFile Production Release ${{ env.APP_VERSION }}
* **Optimized & Architecture Split**: Download `arm64-v8a` for 64-bit modern devices.
* **ARM64 only**: Download `arm64-v8a` for 64-bit modern devices.
* Professionally signed and compiled with R8 code shrinking, Dart obfuscation, and uncompressed native libs.
draft: false
prerelease: false
Expand Down