parent
959a024861
commit
777c88bcea
1 changed files with 15 additions and 13 deletions
28
.github/workflows/community_release_actions.yml
vendored
28
.github/workflows/community_release_actions.yml
vendored
|
@ -13,10 +13,11 @@ jobs:
|
||||||
id: get-release-url
|
id: get-release-url
|
||||||
run: |
|
run: |
|
||||||
if [ "${{ github.event.release.prerelease }}" == "true" ]; then
|
if [ "${{ github.event.release.prerelease }}" == "true" ]; then
|
||||||
URL="https://zed.dev/releases/preview/latest"
|
URL="https://zed.dev/releases/preview/latest"
|
||||||
else
|
else
|
||||||
URL="https://zed.dev/releases/stable/latest"
|
URL="https://zed.dev/releases/stable/latest"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "URL=$URL" >> $GITHUB_OUTPUT
|
echo "URL=$URL" >> $GITHUB_OUTPUT
|
||||||
- name: Get content
|
- name: Get content
|
||||||
uses: 2428392/gh-truncate-string-action@b3ff790d21cf42af3ca7579146eedb93c8fb0757 # v1.4.1
|
uses: 2428392/gh-truncate-string-action@b3ff790d21cf42af3ca7579146eedb93c8fb0757 # v1.4.1
|
||||||
|
@ -41,25 +42,26 @@ jobs:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Check if release was promoted from preview
|
- name: Check if release was promoted from preview
|
||||||
id: check-promotion-from-preview
|
id: check-promotion-from-preview
|
||||||
run: |
|
run: |
|
||||||
VERSION="${{ github.event.release.tag_name }}"
|
VERSION="${{ github.event.release.tag_name }}"
|
||||||
PREVIEW_TAG="${VERSION}-pre"
|
PREVIEW_TAG="${VERSION}-pre"
|
||||||
if git rev-parse "$PREVIEW_TAG" >/dev/null 2>&1; then
|
|
||||||
echo "was_preview=true" >> $GITHUB_OUTPUT
|
if git rev-parse "$PREVIEW_TAG" > /dev/null 2>&1; then
|
||||||
|
echo "was_promoted_from_preview=true" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
echo "was_preview=false" >> $GITHUB_OUTPUT
|
echo "was_promoted_from_preview=false" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Send release notes email
|
- name: Send release notes email
|
||||||
if: steps.check-promotion-from-preview.outputs.was_preview == 'true'
|
if: steps.check-promotion-from-preview.outputs.was_promoted_from_preview == 'true'
|
||||||
run: |
|
run: |
|
||||||
curl -X POST "https://zed.dev/api/send_release_notes_email" \
|
curl -X POST "https://zed.dev/api/send_release_notes_email" \
|
||||||
-H "Authorization: Bearer ${{ secrets.RELEASE_NOTES_API_TOKEN }}" \
|
-H "Authorization: Bearer ${{ secrets.RELEASE_NOTES_API_TOKEN }}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d '{
|
-d '{
|
||||||
"version": "${{ github.event.release.tag_name }}",
|
"version": "${{ github.event.release.tag_name }}",
|
||||||
"markdown_body": ${{ toJSON(github.event.release.body) }}
|
"markdown_body": ${{ toJSON(github.event.release.body) }}
|
||||||
}'
|
}'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue