zed/.github/workflows/release_actions.yml
Bjerg f7fc4ffbe5
Disable Discord URL embed (#6892)
Wrapping links in `<` and `>` disables auto-embeds in Discord, even if
it's a markdown-style link.

Closes #6884

Release Notes:

- N/A
2024-01-27 15:34:36 -05:00

32 lines
1 KiB
YAML

on:
release:
types: [published]
jobs:
discord_release:
runs-on: ubuntu-latest
steps:
- name: Get release URL
id: get-release-url
run: |
if [ "${{ github.event.release.prerelease }}" == "true" ]; then
URL="https://zed.dev/releases/preview/latest"
else
URL="https://zed.dev/releases/stable/latest"
fi
echo "::set-output name=URL::$URL"
- name: Get content
uses: 2428392/gh-truncate-string-action@v1.3.0
id: get-content
with:
stringToTruncate: |
📣 Zed [${{ github.event.release.tag_name }}](<${{ steps.get-release-url.outputs.URL }}>) was just released!
${{ github.event.release.body }}
maxLength: 2000
truncationSymbol: "..."
- name: Discord Webhook Action
uses: tsickert/discord-webhook@v5.3.0
with:
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
content: ${{ steps.get-content.outputs.string }}