Skip to content

Commit 226ebaf

Browse files
mherboldclaude
andcommitted
Add GitHub Actions workflow to announce releases on Discord
Replaces the GitHub webhook to Discord - triggers only on full releases, so pre-releases are no longer announced. Posts an embed with the release name, link, and notes to the announcement channel. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 345f0d8 commit 226ebaf

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Announce release on Discord
2+
3+
on:
4+
release:
5+
types: [released] # full releases only — pre-releases fire "prereleased" and are ignored
6+
workflow_dispatch: # allows a manual test run from the Actions tab
7+
8+
jobs:
9+
announce:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Post release announcement to Discord
13+
env:
14+
WEBHOOK_URL: ${{ secrets.DISCORD_RELEASE_WEBHOOK }}
15+
RELEASE_NAME: ${{ github.event.release.name || 'Test announcement — the release workflow is working' }}
16+
RELEASE_URL: ${{ github.event.release.html_url || 'https://github.com/mherbold/MarvinsAIRARefactored/releases' }}
17+
RELEASE_BODY: ${{ github.event.release.body || 'This was a manual test run of the release announcement workflow. Real announcements will show the release notes here.' }}
18+
run: |
19+
jq -n \
20+
--arg title "$RELEASE_NAME" \
21+
--arg url "$RELEASE_URL" \
22+
--arg body "$RELEASE_BODY" \
23+
'{ embeds: [ { title: $title, url: $url, description: ($body | .[0:4000]), color: 5763719 } ] }' \
24+
| curl -sf -H "Content-Type: application/json" -d @- "$WEBHOOK_URL"

0 commit comments

Comments
 (0)