Skip to content

Commit a16f69c

Browse files
Modify APK naming convention to include version code
Updated APK renaming to include version code from pubspec.yaml.
1 parent 78358b5 commit a16f69c

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/android-release.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@ jobs:
4646

4747
- name: Rename APKs with version tag
4848
run: |
49-
mv mobile/build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk mobile/build/app/outputs/flutter-apk/elephant-${{ github.ref_name }}-armeabi-v7a.apk
50-
mv mobile/build/app/outputs/flutter-apk/app-arm64-v8a-release.apk mobile/build/app/outputs/flutter-apk/elephant-${{ github.ref_name }}-arm64-v8a.apk
51-
mv mobile/build/app/outputs/flutter-apk/app-x86_64-release.apk mobile/build/app/outputs/flutter-apk/elephant-${{ github.ref_name }}-x86_64.apk
49+
VERSION_CODE=$(grep '^version:' mobile/pubsec.yaml | cut -d'+' -f2)
50+
mv mobile/build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk mobile/build/app/outputs/flutter-apk/elephant-${{ github.ref_name }}-${ VERSION_CODE }1.apk
51+
mv mobile/build/app/outputs/flutter-apk/app-arm64-v8a-release.apk mobile/build/app/outputs/flutter-apk/elephant-${{ github.ref_name }}-${ VERSION_CODE }2.apk
52+
mv mobile/build/app/outputs/flutter-apk/app-x86_64-release.apk mobile/build/app/outputs/flutter-apk/elephant-${{ github.ref_name }}-${ VERSION_CODE }3.apk
5253
5354
- name: Create or update GitHub Release
5455
uses: softprops/action-gh-release@v2

0 commit comments

Comments
 (0)