From 0d3e4682c087735beb1e9ca6ffe409846663121f Mon Sep 17 00:00:00 2001 From: Gergely Hegedus Date: Fri, 8 Sep 2023 10:01:28 +0300 Subject: [PATCH] uncomment android firebase distribution & simplify ruby+fastlane setup --- .github/workflows/deploy_to_firebase.yml | 105 +++++++++--------- .../deploy_to_playstore_testflight.yml | 7 +- 2 files changed, 55 insertions(+), 57 deletions(-) diff --git a/.github/workflows/deploy_to_firebase.yml b/.github/workflows/deploy_to_firebase.yml index 2cfd8ba..877c70b 100644 --- a/.github/workflows/deploy_to_firebase.yml +++ b/.github/workflows/deploy_to_firebase.yml @@ -4,59 +4,58 @@ on: workflow_dispatch: jobs: -# android-publish-to-firebase: -# runs-on: ubuntu-latest -# permissions: -# contents: read -# steps: -# - name: Checkout repository -# uses: actions/checkout@v3 -# - name: Setup Java -# uses: actions/setup-java@v3 -# with: -# distribution: 'adopt' -# java-version: '11' -# cache: gradle -# - name: Setup Node -# uses: actions/setup-node@v3 -# with: -# node-version: 16 -# cache: 'npm' -# - name: Set up Ruby -# uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1 -# with: -# ruby-version: '3.2.1' -# - name: Setup Fastlane -# working-directory: ./android -# run: bundle install -# - name: node_modules cache -# uses: actions/cache@v3 -# id: npm-cache -# with: -# path: node_modules -# key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} -# restore-keys: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} -# - name: Install Dependencies -# run: npm ci -# - name: Restore Release Keystore -# env: -# keystore_base64: ${{ secrets.RELEASE_KEYSTORE_BASE64 }} -# run: | -# echo "$keystore_base64" | base64 --decode > release.keystore -# echo "CI_EVALUATION_KEYSTORE_FILE=`pwd`/release.keystore" >> $GITHUB_ENV -# - name: Restore Firebase Service Account -# env: -# firebase_service_account_base64: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_BASE64 }} -# run: | -# echo "$firebase_service_account_base64" | base64 --decode > firebase-distribution-service-account.json -# echo "CI_EVALUATION_FIREBASE_SERVICE_ACCOUNT_FILE=`pwd`/firebase-distribution-service-account.json" >> $GITHUB_ENV -# - name: Deploy to Firebase -# env: -# CI_EVALUATION_KEY_ALIAS: ${{ secrets.CI_EVALUATION_KEY_ALIAS }} -# CI_EVALUATION_KEY_PASSWORD: ${{ secrets.CI_EVALUATION_KEY_PASSWORD }} -# CI_EVALUATION_STORE_PASSWORD: ${{ secrets.CI_EVALUATION_STORE_PASSWORD }} -# working-directory: ./android -# run: bundle exec fastlane deployInternalFirebase + android-publish-to-firebase: + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Setup Java + uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: '11' + cache: gradle + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: 16 + cache: 'npm' + - name: Set up Ruby & Fastlane + uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1 + with: + ruby-version: '3.2.1' + bundler-cache: true + working-directory: ./android + - name: node_modules cache + uses: actions/cache@v3 + id: npm-cache + with: + path: node_modules + key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} + restore-keys: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} + - name: Install Dependencies + run: npm ci + - name: Restore Release Keystore + env: + keystore_base64: ${{ secrets.RELEASE_KEYSTORE_BASE64 }} + run: | + echo "$keystore_base64" | base64 --decode > release.keystore + echo "CI_EVALUATION_KEYSTORE_FILE=`pwd`/release.keystore" >> $GITHUB_ENV + - name: Restore Firebase Service Account + env: + firebase_service_account_base64: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_BASE64 }} + run: | + echo "$firebase_service_account_base64" | base64 --decode > firebase-distribution-service-account.json + echo "CI_EVALUATION_FIREBASE_SERVICE_ACCOUNT_FILE=`pwd`/firebase-distribution-service-account.json" >> $GITHUB_ENV + - name: Deploy to Firebase + env: + CI_EVALUATION_KEY_ALIAS: ${{ secrets.CI_EVALUATION_KEY_ALIAS }} + CI_EVALUATION_KEY_PASSWORD: ${{ secrets.CI_EVALUATION_KEY_PASSWORD }} + CI_EVALUATION_STORE_PASSWORD: ${{ secrets.CI_EVALUATION_STORE_PASSWORD }} + working-directory: ./android + run: bundle exec fastlane deployInternalFirebase ios-publish-to-firebase: runs-on: macos-latest diff --git a/.github/workflows/deploy_to_playstore_testflight.yml b/.github/workflows/deploy_to_playstore_testflight.yml index 244b2c6..3d810a3 100644 --- a/.github/workflows/deploy_to_playstore_testflight.yml +++ b/.github/workflows/deploy_to_playstore_testflight.yml @@ -22,13 +22,12 @@ jobs: with: node-version: 16 cache: 'npm' - - name: Set up Ruby + - name: Set up Ruby & Fastlane uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1 with: ruby-version: '3.2.1' - - name: Setup Fastlane - working-directory: ./android - run: bundle install + bundler-cache: true + working-directory: ./android - name: node_modules cache uses: actions/cache@v3 id: npm-cache