From a92fd1eccb8d2a1713f8e61b5fa93672e3e1d9df Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 15 Nov 2023 12:36:27 +0800 Subject: [PATCH] chore: using dev.env --- .github/workflows/release.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f30458b..cca2e47 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -53,10 +53,18 @@ jobs: - name: Create Env file run: | - touch .env - echo CLOUD_TYPE=1 >> .env - echo SUPABASE_URL=${{ secrets.SUPABASE_URL }} >> .env - echo SUPABASE_ANON_KEY=${{ secrets.SUPABASE_ANON_KEY }} >> .env + cp dev.env .env + sed -i 's|CLOUD_TYPE=.*|CLOUD_TYPE=${{ secrets.CLOUD_TYPE }}|' .env + + if [ "${{ secrets.CLOUD_TYPE }}" = "1" ]; then + sed -i 's|SUPABASE_URL=.*|SUPABASE_URL=${{ secrets.SUPABASE_URL }}|' .env + sed -i 's|SUPABASE_ANON_KEY=.*|SUPABASE_ANON_KEY=${{ secrets.SUPABASE_ANON_KEY }}|' .env + elif [ "${{ secrets.CLOUD_TYPE }}" = "2" ]; then + sed -i 's|APPFLOWY_CLOUD_BASE_URL=.*|APPFLOWY_CLOUD_BASE_URL=${{ secrets.APPFLOWY_CLOUD_BASE_URL }}|' .env + sed -i 's|APPFLOWY_CLOUD_WS_BASE_URL=.*|APPFLOWY_CLOUD_WS_BASE_URL=${{ secrets.APPFLOWY_CLOUD_WS_BASE_URL }}|' .env + sed -i 's|APPFLOWY_CLOUD_GOTRUE_URL=.*|APPFLOWY_CLOUD_GOTRUE_URL=${{ secrets.APPFLOWY_CLOUD_GOTRUE_URL }}|' .env + fi + cat .env working-directory: frontend/appflowy_flutter - name: Upload .env file