diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0b6807d..763cb36 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 @@ -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]