diff --git a/.github/actions/flutter-setup/action.yml b/.github/actions/flutter-setup/action.yml index beddc20..f523154 100644 --- a/.github/actions/flutter-setup/action.yml +++ b/.github/actions/flutter-setup/action.yml @@ -1,34 +1,41 @@ name: 'Flutter Setup' description: 'Sets up Flutter environment with Firebase configuration' inputs: - firebase-options: - description: 'Firebase options for configuration' + firebase-token: + description: 'Firebase token' required: true +env: + FIREBASE_TOKEN: ${{ inputs.firebase-token }} + runs: using: "composite" - steps: - - name: Cache Flutter and Dart dependencies - uses: actions/cache@v4 - with: - path: | - ~/.pub-cache - ~/.flutter - key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.yaml') }} - restore-keys: | - ${{ runner.os }}-pub- - + steps: - name: Setup Flutter - uses: subosito/flutter-action@v2 + uses: flutter-actions/setup-flutter@v3 with: channel: stable + version: latest cache: true + cache-sdk: true + cache-key: true - name: Disable cli animation and analytics shell: bash run: | flutter config --no-cli-animations flutter config --no-analytics + + - name: Setup node + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Setup firebase tools + shell: bash + run: sudo npm install -g firebase-tools - name: Configure firebase options shell: bash - run: echo "${{ inputs.firebase-options }}" > ./lib/firebase_options.dart + run: | + dart pub global activate flutterfire_cli 1.0.1-dev.4 + flutterfire configure -p authentication-699e4 --android-package-name=com.codeTrenchers.evBookingOperators --platforms="android" --yes diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index d5b6222..62405c1 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -17,7 +17,7 @@ jobs: - name: Setup Flutter Environment uses: ./.github/actions/flutter-setup with: - firebase-options: ${{ secrets.FIREBASE_OPTIONS }} + firebase-token: ${{ secrets.FIREBASE_TOKEN }} - name: Dart Format Check run: dart format --output=none $(find . -name "*.dart" ! -path "./lib/firebase_options.dart") --set-exit-if-changed diff --git a/.gitignore b/.gitignore index 686a0ae..0b3db94 100644 --- a/.gitignore +++ b/.gitignore @@ -44,4 +44,5 @@ app.*.map.json /android/app/debug /android/app/profile /android/app/release -/android/app/build \ No newline at end of file +/android/app/build +.fvm/