Skip to content

Commit

Permalink
refactor: build release
Browse files Browse the repository at this point in the history
  • Loading branch information
appflowy committed Nov 14, 2023
1 parent dddb544 commit caad9db
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,11 @@ jobs:
cargo make appflowy-flutter-deps-tools
shell: bash

- name: Build release notes
- name: Create release notes
id: create_release_notes
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 }}
RELEASE_NOTES=$(cat CHANGELOG.md | sed -e '/./{H;$!d;}' -e "x;/##\ Version\ ${{ steps.parse_tag.outputs.version }}/"'!d;')
echo "::set-output name=release_notes::$RELEASE_NOTES"
shell: bash

- name: Create release
Expand All @@ -117,25 +118,24 @@ jobs:
with:
tag_name: ${{ github.ref }}
release_name: ${{ steps.parse_tag.outputs.version }}
body_path: ${{ env.RELEASE_NOTES_PATH }}
body: ${{ steps.create_release_notes.outputs.release_notes }}

- name: Generate Env file
- name: Prepare and Modify Env file
run: |
touch .env
echo "CLOUD_TYPE=${{ secrets.CLOUD_TYPE }}" >> .env
if [ "${{ matrix.environment }}" = "SUPABASE" ]; then
cp dev.env .env
if [ "${{ secrets.CLOUD_TYPE }}" = "1" ]; then
echo "SUPABASE_URL=${{ secrets.SUPABASE_URL }}" >> .env
echo "SUPABASE_ANON_KEY=${{ secrets.SUPABASE_ANON_KEY }}" >> .env
fi
if [ "${{ matrix.environment }}" = "APPFLOWY_CLOUD" ]; then
elif [ "${{ secrets.CLOUD_TYPE }}" = "2" ]; then
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
fi
sed -i "s/CLOUD_TYPE=0/CLOUD_TYPE=${{ secrets.CLOUD_TYPE }}/" .env
working-directory: frontend/appflowy_flutter
shell: bash


build-for-windows:
name: ${{ matrix.job.target }} (${{ matrix.job.os }}) ${{ matrix.environment }}
needs: [prepare]
Expand Down

0 comments on commit caad9db

Please sign in to comment.