CI: Add deploy android fastlane job
This commit is contained in:
parent
348184e9d3
commit
e8be6fad0f
1 changed files with 49 additions and 1 deletions
48
.github/workflows/main_deploy.yaml
vendored
48
.github/workflows/main_deploy.yaml
vendored
|
|
@ -8,6 +8,9 @@ on:
|
||||||
env:
|
env:
|
||||||
FLUTTER_VERSION: ${{ secrets.FLUTTER_VERSION }}
|
FLUTTER_VERSION: ${{ secrets.FLUTTER_VERSION }}
|
||||||
JAVA_VERSION: ${{ secrets.JAVA_VERSION }}
|
JAVA_VERSION: ${{ secrets.JAVA_VERSION }}
|
||||||
|
FDROID_KEY: ${{ secrets.FDROID_KEY }}
|
||||||
|
FDROID_KEY_PASS: ${{ secrets.FDROID_KEY_PASS }}
|
||||||
|
PLAYSTORE_DEPLOY_KEY: ${{ secrets.PLAYSTORE_DEPLOY_KEY }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy_web:
|
deploy_web:
|
||||||
|
|
@ -39,3 +42,48 @@ jobs:
|
||||||
personal_token: ${{ secrets.PAGES_DEPLOY_TOKEN }}
|
personal_token: ${{ secrets.PAGES_DEPLOY_TOKEN }}
|
||||||
publish_dir: ./public
|
publish_dir: ./public
|
||||||
publish_branch: gh-pages
|
publish_branch: gh-pages
|
||||||
|
|
||||||
|
deploy_playstore_internal:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-java@v1
|
||||||
|
with:
|
||||||
|
java-version: ${{ env.JAVA_VERSION }}
|
||||||
|
- uses: subosito/flutter-action@v2
|
||||||
|
with:
|
||||||
|
flutter-version: ${{ env.FLUTTER_VERSION }}
|
||||||
|
- name: Set up Ruby
|
||||||
|
uses: ruby/setup-ruby@v1
|
||||||
|
with:
|
||||||
|
ruby-version: 2.7
|
||||||
|
- name: Install Fastlane
|
||||||
|
run: gem install fastlane -NV
|
||||||
|
- name: Apply Google Services Patch
|
||||||
|
run: git apply ./scripts/enable-android-google-services.patch
|
||||||
|
- run: flutter pub get
|
||||||
|
- name: Prepare Android Release Build
|
||||||
|
run: |
|
||||||
|
cd android
|
||||||
|
echo $FDROID_KEY | base64 --decode --ignore-garbage > key.jks
|
||||||
|
echo "storePassword=${FDROID_KEY_PASS}" >> key.properties
|
||||||
|
echo "keyPassword=${FDROID_KEY_PASS}" >> key.properties
|
||||||
|
echo "keyAlias=key" >> key.properties
|
||||||
|
echo "storeFile=../key.jks" >> key.properties
|
||||||
|
echo $PLAYSTORE_DEPLOY_KEY >> keys.json
|
||||||
|
ls | grep key
|
||||||
|
bundle install
|
||||||
|
bundle update fastlane
|
||||||
|
bundle exec fastlane set_build_code_internal
|
||||||
|
cd ..
|
||||||
|
- name: Build Android Release
|
||||||
|
run: flutter build appbundle --target-platform android-arm,android-arm64,android-x64
|
||||||
|
- name: Deploy Android Release
|
||||||
|
run: |
|
||||||
|
mkdir -p build/android
|
||||||
|
cp build/app/outputs/bundle/release/app-release.aab build/android/
|
||||||
|
cd android
|
||||||
|
bundle install
|
||||||
|
bundle update fastlane
|
||||||
|
bundle exec fastlane deploy_internal_test
|
||||||
|
cd ..
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue