ci: Send emails for weekly release (#27102)

Peter Tripp created

Release Notes:

- N/A

Change summary

.github/workflows/community_release_actions.yml | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)

Detailed changes

.github/workflows/community_release_actions.yml 🔗

@@ -58,12 +58,11 @@ jobs:
       - name: Send release notes email
         if: steps.check-promotion-from-preview.outputs.was_promoted_from_preview == 'true'
         run: |
+          TAG="${{ github.event.release.tag_name }}"
+          echo \"${{ toJSON(github.event.release.body) }}\" > release_body.txt
+          jq -n --arg tag "$TAG" --rawfile body release_body.txt '{version: $tag, markdown_body: $body}' \
+            > release_data.json
           curl -X POST "https://zed.dev/api/send_release_notes_email" \
-              -H "Authorization: Bearer ${{ secrets.RELEASE_NOTES_API_TOKEN }}" \
-              -H "Content-Type: application/json" \
-              -d @- <<-JSON
-                  {
-                      "version": "${{ github.event.release.tag_name }}",
-                      "markdown_body": ${{ toJSON(github.event.release.body) }}
-                  }
-              JSON
+            -H "Authorization: Bearer ${{ secrets.RELEASE_NOTES_API_TOKEN }}" \
+            -H "Content-Type: application/json" \
+            -d @release_data.json