Skip to content

Commit

Permalink
fix: build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
appflowy committed Nov 15, 2023
1 parent a8904c4 commit 1347674
Showing 1 changed file with 51 additions and 38 deletions.
89 changes: 51 additions & 38 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,11 @@ jobs:
echo "::set-output name=version::$VERSION"
echo "::set-output name=branch_name::$BRANCH_NAME"
- name: Checkout
- name: Checkout source code
uses: actions/checkout@v2
with:
repository: AppFlowy-IO/AppFlowy
ref: ${{ steps.parse_tag.outputs.branch_name }}

- name: Create release notes
id: create_release_notes
Expand All @@ -51,28 +54,6 @@ jobs:
release_name: ${{ steps.parse_tag.outputs.version }}
body: ${{ steps.create_release_notes.outputs.release_notes }}

- name: Create Env file
run: |
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
uses: actions/upload-artifact@v2
with:
name: env-file
path: frontend/appflowy_flutter/.env

build-for-windows:
name: ${{ matrix.job.target }} (${{ matrix.job.os }}) ${{ matrix.environment }}
needs: prepare
Expand All @@ -96,11 +77,21 @@ jobs:
repository: AppFlowy-IO/AppFlowy
ref: ${{ needs.prepare.outputs.branch_name }}

- name: Download .env file
uses: actions/download-artifact@v2
with:
name: env-file
path: frontend/appflowy_flutter
- name: Create Env file
run: |
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
working-directory: frontend/appflowy_flutter
shell: bash

- name: Install flutter
uses: subosito/flutter-action@v2
Expand Down Expand Up @@ -172,11 +163,22 @@ jobs:
repository: AppFlowy-IO/AppFlowy
ref: ${{ needs.prepare.outputs.branch_name }}

- name: Download .env file
uses: actions/download-artifact@v2
with:
name: env-file
path: frontend/appflowy_flutter
- name: Create Env file
run: |
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
shell: bash

- name: Install flutter
uses: subosito/flutter-action@v2
Expand Down Expand Up @@ -271,11 +273,22 @@ jobs:
repository: AppFlowy-IO/AppFlowy
ref: ${{ needs.prepare.outputs.branch_name }}

- name: Download .env file
uses: actions/download-artifact@v2
with:
name: env-file
path: frontend/appflowy_flutter
- name: Create Env file
run: |
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
working-directory: frontend/appflowy_flutter
shell: bash


- name: Install flutter
uses: subosito/flutter-action@v2
Expand Down

0 comments on commit 1347674

Please sign in to comment.