From 9d7bc9853ad769045ebc8e7b5c228792f1062398 Mon Sep 17 00:00:00 2001 From: Brord van Wierst Date: Fri, 19 Jan 2024 17:50:45 +0100 Subject: [PATCH] Produciton deploy (#45) * git patch fix --- .github/workflows/release.yaml | 22 +++++++++ scripts/enable-android-google-services.patch | 48 -------------------- 2 files changed, 22 insertions(+), 48 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e26c8f2fa..bf7a921e4 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -12,6 +12,7 @@ concurrency: jobs: build_web: runs-on: ubuntu-latest + environment: production steps: - uses: actions/checkout@v2 - run: cat .github/workflows/versions.env >> $GITHUB_ENV @@ -45,6 +46,7 @@ jobs: build_apk: runs-on: ubuntu-latest + environment: production steps: - uses: actions/checkout@v2 - run: cat .github/workflows/versions.env >> $GITHUB_ENV @@ -81,6 +83,7 @@ jobs: build_linux: runs-on: ubuntu-latest + environment: production steps: - uses: actions/checkout@v2 - run: cat .github/workflows/versions.env >> $GITHUB_ENV @@ -106,6 +109,7 @@ jobs: deploy_playstore: runs-on: ubuntu-latest + environment: production steps: - uses: actions/checkout@v2 - run: cat .github/workflows/versions.env >> $GITHUB_ENV @@ -154,3 +158,21 @@ jobs: bundle exec fastlane deploy_release fi cd .. + + deploy_web: + runs-on: ubuntu-latest + needs: build_web + environment: staging + steps: + - uses: actions/checkout@v2 + - name: Download web + uses: actions/download-artifact@v3 + with: + name: web + path: build/web + - name: Set up AWS CLI + uses: aws-actions/configure-aws-credentials@v2 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ secrets.AWS_DEFAULT_REGION }} diff --git a/scripts/enable-android-google-services.patch b/scripts/enable-android-google-services.patch index 95dfaa1ff..5580af371 100644 --- a/scripts/enable-android-google-services.patch +++ b/scripts/enable-android-google-services.patch @@ -109,51 +109,3 @@ index 1afc4606..894d1571 100644 override fun provideFlutterEngine(context: Context): FlutterEngine? { return provideEngine(this) } -diff --git a/android/build.gradle b/android/build.gradle -index 85aa8647..3b7e09e7 100644 ---- a/android/build.gradle -+++ b/android/build.gradle -@@ -8,7 +8,7 @@ buildscript { - dependencies { - classpath 'com.android.tools.build:gradle:7.1.2' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" -- //classpath 'com.google.gms:google-services:4.3.8' -+ classpath 'com.google.gms:google-services:4.3.8' - } - } - -diff --git a/lib/utils/background_push.dart b/lib/utils/background_push.dart -index 8e67ae92..da4da5c3 100644 ---- a/lib/utils/background_push.dart -+++ b/lib/utils/background_push.dart -@@ -39,7 +39,7 @@ import '../config/setting_keys.dart'; - import '../widgets/matrix.dart'; - import 'platform_infos.dart'; - --//import 'package:fcm_shared_isolate/fcm_shared_isolate.dart'; -+import 'package:fcm_shared_isolate/fcm_shared_isolate.dart'; - - class NoTokenException implements Exception { - String get cause => 'Cannot get firebase token'; -@@ -64,7 +64,7 @@ class BackgroundPush { - - final pendingTests = >{}; - -- final dynamic firebase = null; //FcmSharedIsolate(); -+ final dynamic firebase = FcmSharedIsolate(); - - DateTime? lastReceivedPush; - -diff --git a/pubspec.yaml b/pubspec.yaml -index 6999d0b8..b2c9144f 100644 ---- a/pubspec.yaml -+++ b/pubspec.yaml -@@ -26,7 +26,7 @@ dependencies: - emoji_picker_flutter: ^1.6.3 - emoji_proposal: ^0.0.1 - emojis: ^0.9.9 -- #fcm_shared_isolate: ^0.1.0 -+ fcm_shared_isolate: ^0.1.0 - file_picker: ^6.1.1 - flutter: - sdk: flutter