2022-10-06 01:22:53 +00:00
|
|
|
on:
|
|
|
|
release:
|
|
|
|
types: [published]
|
2022-10-11 22:25:36 +00:00
|
|
|
|
2022-10-06 01:22:53 +00:00
|
|
|
jobs:
|
2022-10-11 22:25:36 +00:00
|
|
|
discord_release:
|
2022-10-06 01:22:53 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-11-02 13:05:29 +00:00
|
|
|
- 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
|
2024-08-15 14:38:06 +00:00
|
|
|
uses: 2428392/gh-truncate-string-action@e6b5885fb83c81ca9a700a91b079baec2133be3e # v1.4.0
|
2023-11-02 13:05:29 +00:00
|
|
|
id: get-content
|
|
|
|
with:
|
|
|
|
stringToTruncate: |
|
2024-01-27 20:34:36 +00:00
|
|
|
📣 Zed [${{ github.event.release.tag_name }}](<${{ steps.get-release-url.outputs.URL }}>) was just released!
|
2023-07-28 19:12:37 +00:00
|
|
|
|
2023-11-02 13:05:29 +00:00
|
|
|
${{ github.event.release.body }}
|
|
|
|
maxLength: 2000
|
|
|
|
truncationSymbol: "..."
|
|
|
|
- name: Discord Webhook Action
|
2024-07-25 13:19:05 +00:00
|
|
|
uses: tsickert/discord-webhook@c840d45a03a323fbc3f7507ac7769dbd91bfb164 # v5.3.0
|
2023-11-02 13:05:29 +00:00
|
|
|
with:
|
|
|
|
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
|
|
|
content: ${{ steps.get-content.outputs.string }}
|