zed/.github/workflows/release_actions.yml

32 lines
949 B
YAML
Raw Normal View History

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