Skip to content

fix: Fix Flutter CI environment variables + add build artifact uploads #9

fix: Fix Flutter CI environment variables + add build artifact uploads

fix: Fix Flutter CI environment variables + add build artifact uploads #9

Workflow file for this run

name: Flutter CI
on:
pull_request:
branches:
- master
jobs:
main:
runs-on: macos-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: "17"
distribution: "temurin"
- name: Decode Keystore
env:
ENCODED_KEYSTORE: ${{ secrets.UPLOAD_KEYSTORE_BASE64 }}
DECODED_KEYSTORE_PATH: ${{ secrets.STORE_FILE }}
run: |
echo $ENCODED_KEYSTORE > keystore_base64.txt
base64 -d keystore_base64.txt > $DECODED_KEYSTORE_PATH
- name: Populate android/key.properties
run: |
echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> android/key.properties
echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> android/key.properties
echo "storePassword=${{ secrets.STORE_PASSWORD }}" >> android/key.properties
echo "storeFile=${{ secrets.STORE_FILE }}" >> android/key.properties
- name: Run flutter doctor
run: flutter doctor
- name: Run pub get
run: flutter pub get
- name: Run flutter test
run: flutter test
- name: Build iOS
id: build-ios
run: flutter build ios --release --no-codesign
- name: Build APK
id: build-apk
run: flutter build apk --split-per-abi
- name: Build App Bundle
id: build-app-bundle
run: flutter build appbundle
- name: Archive iOS Artifacts
uses: actions/upload-artifact@v4
with:
name: release-ios
path: build/ios
- name: Archive APK
uses: actions/upload-artifact@v4
with:
name: release-apk
path: build/app/outputs/flutter-apk/
- name: Archive App Bundle
uses: actions/upload-artifact@v4
with:
name: release-aab
path: build/app/outputs/bundle/release/app-release.aab