@@ -240,41 +240,3 @@ jobs:
240240 dist-binaries/checksums.txt
241241 fail_on_unmatched_files : true
242242 generate_release_notes : true
243-
244- notify :
245- needs : [merge, release]
246- runs-on : ubuntu-latest
247- if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
248-
249- steps :
250- - name : Checkout repository
251- uses : actions/checkout@v4
252-
253- - name : Notify Discord
254- env :
255- GH_TOKEN : ${{ github.token }}
256- run : |
257- VERSION=${GITHUB_REF#refs/tags/v}
258-
259- # Fetch release notes from GitHub
260- RELEASE_BODY=$(gh release view ${{ github.ref_name }} --json body -q .body 2>/dev/null || echo "")
261-
262- # Fallback if empty
263- if [ -z "$RELEASE_BODY" ]; then
264- RELEASE_BODY="New release available. See the release page for details."
265- fi
266-
267- # Truncate if too long (Discord embed limit)
268- if [ ${#RELEASE_BODY} -gt 1500 ]; then
269- RELEASE_BODY="${RELEASE_BODY:0:1497}..."
270- fi
271-
272- # Build and send Discord message
273- jq -n \
274- --arg title "Perry ${{ github.ref_name }}" \
275- --arg url "https://github.com/${{ github.repository }}/releases/tag/${{ github.ref_name }}" \
276- --arg desc "$RELEASE_BODY" \
277- '{embeds:[{title:$title,description:$desc,url:$url,color:5025616}]}' | \
278- curl -sf -X POST "${{ secrets.DISCORD_WEBHOOK }}" \
279- -H "Content-Type: application/json" \
280- -d @-
0 commit comments