From 9878b158f13933fc68833729910c95d1a25e0f0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakob=20K=C3=B6rber?= <56073945+jakobkoerber@users.noreply.github.com> Date: Tue, 19 Dec 2023 20:43:00 +0100 Subject: [PATCH] Test Android Deployment --- .github/workflows/deploy_beta.yml | 9 +++++---- android/fastlane/Fastfile | 11 ++++------- lib/firebase_options.dart | 8 +++----- pubspec.yaml | 2 +- 4 files changed, 13 insertions(+), 17 deletions(-) diff --git a/.github/workflows/deploy_beta.yml b/.github/workflows/deploy_beta.yml index 15a54353..1c5752a1 100644 --- a/.github/workflows/deploy_beta.yml +++ b/.github/workflows/deploy_beta.yml @@ -1,17 +1,18 @@ name: Deploy Beta to TestFlight and Play Store on: - release: - types: [ published ] + push: + branches: + - android-workflow jobs: deploy: - if: "github.event.release.prerelease" + # if: "github.event.release.prerelease" runs-on: macos-latest strategy: matrix: - platform: [ ios, android ] + platform: [ android ] #ios, android ] fail-fast: false steps: diff --git a/android/fastlane/Fastfile b/android/fastlane/Fastfile index 6caf865a..7cf909c2 100644 --- a/android/fastlane/Fastfile +++ b/android/fastlane/Fastfile @@ -8,7 +8,6 @@ platform :android do ) end - lane :android_beta do build_number = latest_google_play_version_code @@ -21,27 +20,25 @@ platform :android do upload_to_play_store( json_key_data: Base64.strict_decode64(ENV["GOOGLE_PLAY_SERVICE_ACCOUNT_KEY"]), aab: "../build/app/outputs/bundle/release/app-release.aab", - track: "beta", + track: "internal", release_status: "draft", ) end def latest_google_play_version_code json_key_data = Base64.strict_decode64(ENV["GOOGLE_PLAY_SERVICE_ACCOUNT_KEY"]) - # productionVersionCodes = google_play_track_version_codes(track: 'production', json_key_data: json_key_data) + productionVersionCodes = google_play_track_version_codes(track: 'production', json_key_data: json_key_data) betaVersionCodes = google_play_track_version_codes(track: 'beta', json_key_data: json_key_data) - # alphaVersionCodes = google_play_track_version_codes(track: 'alpha', json_key_data: json_key_data) internalVersionCodes = google_play_track_version_codes(track: 'internal', json_key_data: json_key_data) # puts version codes from all tracks into the same array versionCodes = [ - # productionVersionCodes, + productionVersionCodes, betaVersionCodes, - # alphaVersionCodes, internalVersionCodes ].reduce([], :concat) # returns the highest version code from array - return versionCodes.max+1 + return 1000 end end diff --git a/lib/firebase_options.dart b/lib/firebase_options.dart index 58086e3b..636c8e6d 100644 --- a/lib/firebase_options.dart +++ b/lib/firebase_options.dart @@ -51,7 +51,7 @@ class DefaultFirebaseOptions { static const FirebaseOptions android = FirebaseOptions( apiKey: 'AIzaSyD917lW3Y2-x8UiWfUdzKDnI1iO7Qt7Z5s', - appId: '1:944892355389:android:510d92307b08a9c352db54', + appId: '1:944892355389:android:3fec122c5eb51ef4', messagingSenderId: '944892355389', projectId: 'tca-backend-0001', databaseURL: 'https://tca-backend-0001.firebaseio.com', @@ -65,10 +65,8 @@ class DefaultFirebaseOptions { projectId: 'tca-backend-0001', databaseURL: 'https://tca-backend-0001.firebaseio.com', storageBucket: 'tca-backend-0001.appspot.com', - androidClientId: - '944892355389-jat7kf35dqlvc2uvlsh3vbuq8ge6s6s5.apps.googleusercontent.com', - iosClientId: - '944892355389-qfnnv8c4344dk8ka4904ue35rclf3ipg.apps.googleusercontent.com', + androidClientId: '944892355389-jat7kf35dqlvc2uvlsh3vbuq8ge6s6s5.apps.googleusercontent.com', + iosClientId: '944892355389-qfnnv8c4344dk8ka4904ue35rclf3ipg.apps.googleusercontent.com', iosBundleId: 'de.tum.tca', ); } diff --git a/pubspec.yaml b/pubspec.yaml index 155d5b47..a224fbc0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: campus_flutter description: A new Flutter project. publish_to: 'none' -version: 0.4.0 +version: 4.4.0 environment: sdk: '>=3.0.0 <4.0.0'