Skip to content

re-builiding the auth feature #40

re-builiding the auth feature

re-builiding the auth feature #40

# name: Flutter CI/CD
# on:
# push:
# branches: [ main, develop ]
# pull_request:
# branches: [ main, develop ]
# workflow_dispatch:
# # Define environment variables that can be reused
# env:
# FLUTTER_VERSION: "3.19.0"
# JAVA_VERSION: "12.x"
# jobs:
# analyze-and-test:
# name: Analyze and Test
# runs-on: ubuntu-latest
# timeout-minutes: 30
# steps:
# - name: Checkout code
# uses: actions/checkout@v3
# - name: Setup Java
# uses: actions/setup-java@v3
# with:
# distribution: 'temurin'
# java-version: ${{ env.JAVA_VERSION }}
# - name: Setup Flutter
# uses: subosito/flutter-action@v2
# with:
# flutter-version: ${{ env.FLUTTER_VERSION }}
# channel: 'stable'
# cache: true
# - name: Install dependencies
# run: flutter pub get
# - name: Verify formatting
# run: dart format --output=none --set-exit-if-changed .
# - name: Analyze project source
# run: flutter analyze
# - name: Run tests with coverage
# run: flutter test --coverage
# - name: Upload coverage reports
# uses: codecov/codecov-action@v3
# with:
# file: coverage/lcov.info
# build-android:
# name: Build Android App
# needs: analyze-and-test
# runs-on: ubuntu-latest
# if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop'
# steps:
# - name: Checkout code
# uses: actions/checkout@v3
# - name: Setup Java
# uses: actions/setup-java@v3
# with:
# distribution: 'temurin'
# java-version: ${{ env.JAVA_VERSION }}
# - name: Setup Flutter
# uses: subosito/flutter-action@v2
# with:
# flutter-version: ${{ env.FLUTTER_VERSION }}
# channel: 'stable'
# cache: true
# - name: Install dependencies
# run: flutter pub get
# # Decode base64 key into a file
# - name: Decode Keystore
# if: startsWith(github.ref, 'refs/heads/main')
# run: |
# echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 --decode > android/app/keystore.jks
# # Create key.properties
# - name: Create key.properties
# if: startsWith(github.ref, 'refs/heads/main')
# run: |
# echo "storeFile=keystore.jks" > android/key.properties
# echo "storePassword=${{ secrets.KEYSTORE_PASSWORD }}" >> android/key.properties
# echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> android/key.properties
# echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> android/key.properties
# # Build APK and AAB
# - name: Build Android App
# run: |
# if [[ ${{ github.ref }} == 'refs/heads/main' ]]; then
# flutter build apk --release
# flutter build appbundle --release
# else
# flutter build apk --debug
# fi
# # Upload artifacts
# - name: Upload APK
# uses: actions/upload-artifact@v3
# with:
# name: release-apk
# path: build/app/outputs/flutter-apk/app-release.apk
# if-no-files-found: error
# build-ios:
# name: Build iOS App
# needs: analyze-and-test
# runs-on: macos-latest
# if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop'
# steps:
# - name: Checkout code
# uses: actions/checkout@v3
# - name: Setup Flutter
# uses: subosito/flutter-action@v2
# with:
# flutter-version: ${{ env.FLUTTER_VERSION }}
# channel: 'stable'
# cache: true
# - name: Install dependencies
# run: |
# flutter pub get
# cd ios && pod install && cd ..
# # Build for iOS
# - name: Build iOS App
# run: |
# if [[ ${{ github.ref }} == 'refs/heads/main' ]]; then
# flutter build ios --release --no-codesign
# else
# flutter build ios --debug --no-codesign
# fi
# deploy:
# name: Deploy Apps
# needs: [build-android, build-ios]
# runs-on: ubuntu-latest
# if: github.ref == 'refs/heads/main'
# steps:
# - name: Download APK
# uses: actions/download-artifact@v3
# with:
# name: release-apk
# # Example Firebase App Distribution
# - name: Upload to Firebase App Distribution
# uses: wzieba/Firebase-Distribution-Github-Action@v1
# with:
# appId: ${{ secrets.FIREBASE_APP_ID }}
# serviceCredentialsFileContent: ${{ secrets.CREDENTIAL_FILE_CONTENT }}
# groups: testers
# file: app-release.apk
# releaseNotes: |
# Changes in this build:
# - ${{ github.event.head_commit.message }}