Skip to content

Commit 5535bcd

Browse files
julianknutsenclaude
andcommitted
feat: add Discord notification on release
Post changelog and tag to the Discord webhook after goreleaser completes, using the same DISCORD_WEBHOOK_URL secret as deploy-notify. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c126232 commit 5535bcd

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,25 @@ jobs:
2727
args: release --clean
2828
env:
2929
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
31+
- name: Notify Discord
32+
env:
33+
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_URL }}
34+
TAG: ${{ github.ref_name }}
35+
RELEASE_URL: https://github.com/${{ github.repository }}/releases/tag/${{ github.ref_name }}
36+
run: |
37+
CHANGELOG="$(git log --pretty='%h %s (%an)' "$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || git rev-list --max-parents=0 HEAD)..HEAD" | head -15)"
38+
jq -n \
39+
--arg title "Wasteland $TAG released" \
40+
--arg desc "$CHANGELOG" \
41+
--arg tag "$TAG" \
42+
--arg url "$RELEASE_URL" \
43+
'{embeds: [{
44+
title: $title,
45+
description: $desc,
46+
color: 5025616,
47+
fields: [
48+
{name: "Tag", value: $tag, inline: true}
49+
],
50+
url: $url
51+
}]}' | curl -fsSL -H "Content-Type: application/json" -d @- "$DISCORD_WEBHOOK"

0 commit comments

Comments
 (0)