Skip to content

Commit

Permalink
chore(workflow): add different build number to different apks
Browse files Browse the repository at this point in the history
Signed-off-by: Mumulhl <mumulhl.666@gmail.com>
  • Loading branch information
mumu-lhl committed Sep 7, 2024
1 parent b86b5bf commit 604db64
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,15 @@ jobs:
run: |
echo "${{ secrets.KEY_PROPERTIES }}" > android/key.properties
- name: Get Version Code
run: |
VERSION_CODE=$(sed -n -E "s/version:\ [0-9]+\.[0-9]+\.[0-9]+\+([0-9]+)/\1/p" pubspec.yaml)
- run: flutter pub get
- run: flutter build apk
- run: flutter build apk --split-per-abi
- run: flutter build apk --split-per-abi --target-platform=android-arm64 --build-number=$((VERSION_CODE * 10 + 1))
- run: flutter build apk --split-per-abi --target-platform=android-arm --build-number=$((VERSION_CODE * 10 + 2))
- run: flutter build apk --split-per-abi --target-platform=android-x64 --build-number=$((VERSION_CODE * 10 + 3))
- run: flutter build appbundle

- name: Rename .apk
Expand Down

0 comments on commit 604db64

Please sign in to comment.