From 3b25e6901bb18017baa68d72e7a9ab71f60d81ca Mon Sep 17 00:00:00 2001 From: Meshkat-Shadik Date: Wed, 11 Sep 2024 12:33:50 +0600 Subject: [PATCH] modifiy the github action file --- .github/workflows/dart.yml | 32 +++++++++++++++++++++++++------- pubspec.lock | 8 ++++---- pubspec.yaml | 8 ++++---- 3 files changed, 33 insertions(+), 15 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 99e0944..b6f0289 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -1,8 +1,3 @@ -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - name: Dart on: @@ -18,19 +13,42 @@ jobs: steps: - name: Clone repository uses: actions/checkout@v4 + + # Set up Java 17 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + distribution: "temurin" # This is an OpenJDK distribution + java-version: "17" + + # Set up Flutter - name: Set up Flutter uses: subosito/flutter-action@v2 with: channel: stable flutter-version: 3.24.2 + - run: flutter --version - run: flutter pub get + + # Build APK for debugging - run: flutter build apk --debug --split-per-abi -t lib/main.dart + + # Build release APK and AAB for production + - run: flutter build apk --release --split-per-abi -t lib/main.dart - run: flutter build appbundle + + # Optional: Upload artifact + - name: Upload APK + uses: actions/upload-artifact@v3 + with: + name: app-debug.apk + path: build/app/outputs/flutter-apk/app-debug.apk + + # Push the release - name: Push to Releases uses: oberhauser-dev/flutter-release-action@v0 with: - app-name: 'Weather App' + app-name: "Weather App" tag: v1.0.${{ github.run_number }} token: ${{ secrets.TOKEN }} - diff --git a/pubspec.lock b/pubspec.lock index 8602e3a..f0e5b97 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -809,18 +809,18 @@ packages: dependency: "direct main" description: name: retrofit - sha256: "479cc534c2d83296dac6ae16933dd77e7a52bb54cf7e75e6eb83ee51928c8465" + sha256: "3c9885ef3dbc5dc4b3fb0a40c972ab52e4dad04d52dac9bba24dfa76cf100451" url: "https://pub.dev" source: hosted - version: "4.3.0" + version: "4.4.1" retrofit_generator: dependency: "direct dev" description: name: retrofit_generator - sha256: "0e5045314ddc250f75b8ec38794129b32b51bd82e0f67157cb948488187d502d" + sha256: "8ea6a9d1bd82862fb396462357cce20d8bab57cd7e737ac9e5af8947a2029f32" url: "https://pub.dev" source: hosted - version: "9.0.0" + version: "9.1.1" riverpod: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index ff339d9..c664c48 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -18,12 +18,12 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: ">=3.0.1 <4.0.0" + sdk: ">=3.5.0-259.0.dev <4.0.0" dependencies: auto_route: ^9.2.2 cupertino_icons: ^1.0.8 - device_info_plus: 9.1.2 + device_info_plus: 10.1.2 flutter: sdk: flutter flutter_hooks: ^0.20.5 @@ -36,7 +36,7 @@ dependencies: hooks_riverpod: ^2.5.2 intl: ^0.19.0 permission_handler: ^11.3.1 - retrofit: ^4.3.0 + retrofit: ^4.4.1 riverpod_annotation: ^2.3.5 dev_dependencies: @@ -46,7 +46,7 @@ dev_dependencies: sdk: flutter freezed: ^2.5.7 json_serializable: ^6.8.0 - retrofit_generator: ^9.0.0 + retrofit_generator: ^9.1.1 riverpod_generator: ^2.4.3 riverpod_lint: ^2.3.13 # For information on the generic Dart part of this file, see the