Flutter Build and Upload APK test #18
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
name: Flutter Build and Upload APK test | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Update KeyStore password in gradle properties | |
run: sed -i 's/#{KEYSTORE_PASSWORD}#/${{ secrets.KEYSTORE_PASSWORD }}/g' android/key.properties | |
- name: Update KeyStore key password in gradle properties | |
run: sed -i 's/#{KEY_PASSWORD}#/${{ secrets.KEY_PASSWORD }}/g' android/key.properties | |
- name: Update KeyStore alias in gradle properties | |
run: sed -i 's/#{KEY_ALIAS}#/${{ secrets.KEY_ALIAS }}/g' android/key.properties | |
- name: Setup Java | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
- name: Clean dependencies | |
run: flutter clean | |
- name: Get dependencies | |
run: flutter pub get | |
- name: Build aab | |
run: flutter build appbundle --release | |
- name: Build APK | |
run: flutter build apk --release --split-per-abi | |
- name: Push to Releases | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "build/app/outputs/apk/release/*" | |
tag: v0.0.2 | |
token: ${{ secrets.TOKEN }} |