From 31fc91696ab9bcab68240565dab12e1bbd3cdc8c Mon Sep 17 00:00:00 2001
From: nathan <nathan@appflowy.io>
Date: Tue, 14 Nov 2023 21:13:37 +0800
Subject: [PATCH] refactor: build release

---
 .github/workflows/release.yml | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index ee5782b..bd4503b 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -107,6 +107,7 @@ jobs:
         run: |
           touch ${{ env.RELEASE_NOTES_PATH }}
           cat CHANGELOG.md | sed -e '/./{H;$!d;}' -e "x;/##\ Version\ ${{ steps.parse_tag.outputs.version }}/"'!d;' >> ${{ env.RELEASE_NOTES_PATH }}
+        shell: bash
 
       - name: Create release
         id: create_release
@@ -121,9 +122,16 @@ jobs:
       - name: Generate Env file
         run: |
           touch .env
-          echo CLOUD_TYPE=1 >> .env
+          echo CLOUD_TYPE=${{ secrets.CLOUD_TYPE }} .env
+          ${{ if eq(matrix.environment, 'SUPABASE') }}
           echo SUPABASE_URL=${{ secrets.SUPABASE_URL }} >> .env
           echo SUPABASE_ANON_KEY=${{ secrets.SUPABASE_ANON_KEY }} >> .env
+          ${{ endif }}
+          ${{ if eq(matrix.environment, 'APPFLOWY_CLOUD') }}
+          echo APPFLOWY_CLOUD_BASE_URL=${{ secrets.APPFLOWY_CLOUD_BASE_URL }} >> .env
+          echo APPFLOWY_CLOUD_WS_BASE_URL=${{ secrets.APPFLOWY_CLOUD_WS_BASE_URL }} >> .env
+          echo APPFLOWY_CLOUD_GOTRUE_URL=${{ secrets.APPFLOWY_CLOUD_GOTRUE_URL }} >> .env
+          ${{ endif }}
         working-directory: frontend/appflowy_flutter
 
   build-for-windows: