From 3778189eadf4318c59ea6938164d1eec85933fcc Mon Sep 17 00:00:00 2001 From: Jagandeep Brar Date: Fri, 7 Jan 2022 15:28:51 -0600 Subject: [PATCH] fix(workflows): Improve quality of alpha build workflows --- .github/workflows/build_alpha_android.yml | 18 +++++++++++------- .github/workflows/build_alpha_ios.yml | 16 ++++++++-------- .github/workflows/build_alpha_macos.yml | 18 +++++++++--------- macos/fastlane/Fastfile | 7 ------- 4 files changed, 28 insertions(+), 31 deletions(-) diff --git a/.github/workflows/build_alpha_android.yml b/.github/workflows/build_alpha_android.yml index 5747b22b..0a67ca02 100644 --- a/.github/workflows/build_alpha_android.yml +++ b/.github/workflows/build_alpha_android.yml @@ -13,6 +13,13 @@ jobs: with: ref: 'master' fetch-depth: 0 + + - name: Setup Private Keys + run: | + echo ${{ secrets.GOOGLE_SERVICES_JSON }} | base64 --decode > android/app/google-services.json + echo ${{ secrets.KEY_JKS }} | base64 --decode > android/key.jks + echo ${{ secrets.KEY_PROPERTIES }} | base64 --decode > android/key.properties + echo ${{ secrets.GOOGLE_PLAY_API }} | base64 --decode > .fastlane-android-auth.json - name: Install Ruby uses: ruby/setup-ruby@v1 @@ -27,15 +34,12 @@ jobs: - name: Install Flutter uses: subosito/flutter-action@v2.0.3 with: - flutter-version: '2.9.0-0.1.pre' channel: 'beta' - - - name: Setup Keystore & Firebase + + - name: Setup Flutter + working-directory: ${{ github.workspace }} run: | - echo ${{ secrets.GOOGLE_SERVICES_JSON }} | base64 --decode > android/app/google-services.json - echo ${{ secrets.KEY_JKS }} | base64 --decode > android/key.jks - echo ${{ secrets.KEY_PROPERTIES }} | base64 --decode > android/key.properties - echo ${{ secrets.GOOGLE_PLAY_API }} | base64 --decode > .fastlane-android-auth.json + flutter pub get - name: Run Fastlane working-directory: ${{ github.workspace }}/android diff --git a/.github/workflows/build_alpha_ios.yml b/.github/workflows/build_alpha_ios.yml index 321b915c..799220a3 100644 --- a/.github/workflows/build_alpha_ios.yml +++ b/.github/workflows/build_alpha_ios.yml @@ -19,6 +19,13 @@ jobs: with: ssh-private-key: ${{ secrets.MATCH_SSH_PRIVATE_KEY }} + - name: Setup Private Keys + working-directory: ${{ github.workspace }} + run: | + echo ${{ secrets.GOOGLE_SERVICE_INFO_PLIST }} | base64 --decode > ios/GoogleService-Info.plist + echo ${{ secrets.P8_3Z55GTHMWY }} | base64 --decode > ios/fastlane/3Z55GTHMWY.p8 + + - name: Select Xcode Version uses: maxim-lobanov/setup-xcode@v1 with: @@ -37,10 +44,9 @@ jobs: - name: Install Flutter uses: subosito/flutter-action@v2.0.3 with: - flutter-version: '2.9.0-0.1.pre' channel: 'beta' - - name: Install Flutter Packages + - name: Setup Flutter working-directory: ${{ github.workspace }} run: | flutter pub get @@ -49,12 +55,6 @@ jobs: working-directory: ${{ github.workspace }}/ios run: | pod install --repo-update - - - name: Setup Keys & Firebase - working-directory: ${{ github.workspace }} - run: | - echo ${{ secrets.GOOGLE_SERVICE_INFO_PLIST }} | base64 --decode > ios/GoogleService-Info.plist - echo ${{ secrets.P8_3Z55GTHMWY }} | base64 --decode > ios/fastlane/3Z55GTHMWY.p8 - name: Run Fastlane working-directory: ${{ github.workspace }}/ios diff --git a/.github/workflows/build_alpha_macos.yml b/.github/workflows/build_alpha_macos.yml index 4953b767..cbff3e5d 100644 --- a/.github/workflows/build_alpha_macos.yml +++ b/.github/workflows/build_alpha_macos.yml @@ -13,7 +13,13 @@ jobs: with: ref: 'master' fetch-depth: 0 - + + - name: Setup Keys + working-directory: ${{ github.workspace }} + run: | + echo ${{ secrets.GOOGLE_SERVICE_INFO_PLIST }} | base64 --decode > macos/GoogleService-Info.plist + echo ${{ secrets.P8_3Z55GTHMWY }} | base64 --decode > macos/fastlane/3Z55GTHMWY.p8 + - name: Setup SSH Keys uses: webfactory/ssh-agent@v0.5.4 with: @@ -37,24 +43,18 @@ jobs: - name: Install Flutter uses: subosito/flutter-action@v2.0.3 with: - flutter-version: '2.9.0-0.1.pre' channel: 'beta' - - name: Install Flutter Packages + - name: Setup Flutter working-directory: ${{ github.workspace }} run: | + flutter config --enable-macos-desktop flutter pub get - name: Install Pods working-directory: ${{ github.workspace }}/macos run: | pod install --repo-update - - - name: Setup Keys & Firebase - working-directory: ${{ github.workspace }} - run: | - echo ${{ secrets.GOOGLE_SERVICE_INFO_PLIST }} | base64 --decode > macos/GoogleService-Info.plist - echo ${{ secrets.P8_3Z55GTHMWY }} | base64 --decode > macos/fastlane/3Z55GTHMWY.p8 - name: Run Fastlane working-directory: ${{ github.workspace }}/macos diff --git a/macos/fastlane/Fastfile b/macos/fastlane/Fastfile index 5a433efe..17a59053 100644 --- a/macos/fastlane/Fastfile +++ b/macos/fastlane/Fastfile @@ -15,13 +15,6 @@ platform :mac do ) end - match( - type: "mac_installer_distribution", - readonly: is_ci, - keychain_name: ENV['MATCH_KEYCHAIN_NAME'], - keychain_password: ENV["MATCH_KEYCHAIN_PASSWORD"], - ) - match( type: "appstore", readonly: is_ci,