ci: improve build android

This commit is contained in:
Matias de Andrea
2024-02-18 21:59:31 +01:00
parent 0478fe880a
commit 9814e6aaee
4 changed files with 11 additions and 12 deletions

View File

@ -10,6 +10,7 @@ jobs:
steps:
- name: Get repository
uses: actions/checkout@v4
- name: Configure enviroment
env:
ENV_PROD_BASE64: ${{ secrets.ENV_PROD_BASE64 }}

View File

@ -18,6 +18,13 @@ jobs:
echo $ENV_PROD_BASE64 | base64 --decode > .env/prod.json
echo $ENV_DEV_BASE64 | base64 --decode > .env/dev.json
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '18'
cache: 'gradle'
- name: Get Flutter version
uses: kuhnroyal/flutter-fvm-config-action@v2
id: fvm-config-action
@ -46,6 +53,4 @@ jobs:
echo $PLAY_STORE_UPLOAD_KEY_PROPERTIES | base64 -d > android/key.properties
- name: Build Android prod
run: |
cd android
fastlane build_prod
run: sh tool/build_android_prod.sh prod appbundle

View File

@ -13,18 +13,10 @@
# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane
opt_out_usage
default_platform(:android)
platform :android do
desc "Build app"
lane :build_prod do
Dir.chdir("../..") do
sh("chmod +x tool/build-android.sh")
sh("tool/build-android.sh prod appbundle")
end
sh "zip -r ../split-debug.zip ../split-debug/"
end
desc "Deploy a new version to the Google Play internal test track"
lane :internal do
upload_to_play_store(

View File

@ -16,3 +16,4 @@ else
$command
fi
zip -r android/split-debug.zip android/split-debug/