Update release date #88
Workflow file for this run
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: Android CI QA | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- master | |
env: | |
java_version: '17' | |
ruby_version: '2.7.2' | |
flutter_version: '3.24.4' | |
jobs: | |
android-QA: | |
name: QA Release version | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ env.ruby_version }} | |
bundler-cache: true | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt-hotspot' | |
java-version: ${{ env.java_version }} | |
cache: 'gradle' | |
- name: Cache Flutter dependencies | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
~/.android/build-cache | |
/opt/hostedtoolcache/flutter | |
key: ${{ runner.OS }}-flutter-install-cache-${{ env.flutter_version }} | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
flutter-version: ${{ env.flutter_version }} | |
- name: Flutter pub dependencies | |
run: flutter pub get | |
- name: Flutter add intl and run build_runner | |
run: | | |
flutter pub add intl_utils | |
flutter pub run intl_utils:generate | |
flutter pub run build_runner build | |
- name: Create Firebase Configuration Files forn Native / Flutter | |
env: | |
GOOGLE_SERVICES_ANDROID: ${{ secrets.GOOGLE_SERVICES_ANDROID_JSON }} | |
GOOGLE_SERVICES_IOS: ${{ secrets.GOOGLE_SERVICES_IOS_PLIST }} | |
FIREBASE_APP_ID_IOS: ${{ secrets.FIREBASE_APP_ID_IOS_JSON }} | |
FIREBASE_OPTIONS_DART: ${{ secrets.FIREBASE_OPTIONS_DART }} | |
run: | | |
echo Android google_services.json | |
echo "$GOOGLE_SERVICES_ANDROID" > google-services.json.b64 | |
base64 -d -i google-services.json.b64 > android/app/google-services.json | |
echo iOS google_services.json | |
echo "$GOOGLE_SERVICES_IOS" > GoogleService-Info.plist.b64 | |
base64 -d -i GoogleService-Info.plist.b64 > ios/Runner/GoogleService-Info.plist | |
echo iOS Firebase APP ID | |
echo "$FIREBASE_APP_ID_IOS" > firebase_app_id_file.json.b64 | |
base64 -d -i firebase_app_id_file.json.b64 > ios/firebase_app_id_file.json | |
echo Firebase .dart file | |
echo "$FIREBASE_OPTIONS_DART" > FIREBASE_OPTIONS_DART.dart.b64 | |
base64 -d -i FIREBASE_OPTIONS_DART.dart.b64 > lib/firebase_options.dart | |
- name: Configure Keystore | |
env: | |
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} | |
KEYSTORE_KEY_ALIAS: ${{ secrets.KEY_ALIAS }} | |
KEYSTORE_KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | |
KEYSTORE_STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }} | |
run: | | |
mkdir -p ~/android | |
echo "$PRIVATE_KEY" > AN_key.p12.b64 | |
base64 -d -i AN_key.p12.b64 > android/AN_key.p12 | |
echo "storeFile=../AN_key.p12" >> android/key.properties | |
echo "keyAlias=$KEYSTORE_KEY_ALIAS" >> android/key.properties | |
echo "storePassword=$KEYSTORE_STORE_PASSWORD" >> android/key.properties | |
echo "keyPassword=$KEYSTORE_KEY_PASSWORD" >> android/key.properties | |
- name: Build release version for testing purpose | |
env: | |
AMAZON_TAG: ${{ secrets.AMAZON_TAG }} | |
run: flutter build apk --split-per-abi --no-pub --verbose --release --dart-define=amazon_tag=$AMAZON_TAG | |
- name: Upload APK | |
uses: actions/upload-artifact@v4 | |
with: | |
name: android-app | |
retention-days: 7 | |
path: build/app/outputs/flutter-apk/ |