-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
55245d7
commit d06e1cd
Showing
1 changed file
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: Android Build | ||
|
||
# 1 | ||
on: | ||
# 2 | ||
push: | ||
branches: | ||
- "*" | ||
pull_request: | ||
branches: | ||
- "*" | ||
# 3 | ||
workflow_dispatch: | ||
|
||
# 4 | ||
jobs: | ||
# 5 | ||
build: | ||
# 6 | ||
runs-on: ubuntu-latest | ||
permissions: write-all | ||
|
||
# 7 | ||
steps: | ||
# 8 | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
# 9 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: "17" | ||
cache: 'gradle' | ||
# 10 | ||
- uses: subosito/flutter-action@v2 | ||
with: | ||
# 11 | ||
flutter-version: "3.16.3" | ||
channel: 'stable' | ||
cache: true | ||
|
||
- name: Create key.properties | ||
run: | | ||
echo keyPassword=\${{ secrets.KEY_PASSWORD }} > ./android/key.properties | ||
echo storePassword=\${{ secrets.KEY_STORE_PASSWORD }} >> ./android/key.properties | ||
echo keyAlias=\${{ secrets.KEY_ALIAS }} >> ./android/key.properties | ||
- name: Load key | ||
run: echo "${{ secrets.KEYSTORE_JKS_RELEASE }}" | base64 --decode > android/app/release-key.jks | ||
|
||
- name: Turn off analytics | ||
run: flutter config --no-analytics | ||
|
||
- name: Pub Get Packages | ||
run: flutter pub get | ||
|
||
- name: Build arm APK | ||
run: flutter build apk --release --split-per-abi --target-platform="android-arm" | ||
|
||
- name: Build arm64 APK | ||
run: flutter build apk --release --split-per-abi --target-platform="android-arm64" | ||
|
||
- name: Build x64 APK | ||
run: flutter build apk --release --split-per-abi --target-platform="android-x64" | ||
|
||
- name: Save APKs to Artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: APKs | ||
path: build/app/outputs/flutter-apk/*.apk | ||
|
||
|
||
|
||
|
||
|