Skip to content

Commit ea6ecb2

Browse files
author
LittleCoinCoin
committed
ci: add Discord notifications for releases and pre-releases
Add automated Discord notifications for both stable releases and pre-releases: - release-discord-notification.yml: Full announcements with role mentions for stable releases - prerelease-discord-notification.yml: Testing-focused notifications without role pings Features: - Personalized "Cracking Shells" branding with MCP references - Direct links to GitHub release pages for changelog access - Role mentions (<@&1418053865818951721> --> ) for stable releases only - Different visual styling (green vs orange) to distinguish release types - Triggers on 'released' and 'prereleased' events respectively Integrates with existing semantic-release workflow for automated release management.
1 parent cfa6498 commit ea6ecb2

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Discord Pre-release Notification
2+
3+
on:
4+
release:
5+
types: [prereleased]
6+
7+
jobs:
8+
notify-discord:
9+
runs-on: ubuntu-latest
10+
if: github.event.release.target_commitish == 'main'
11+
steps:
12+
- name: Send Discord Pre-release Notification
13+
uses: sarisia/actions-status-discord@v1
14+
with:
15+
webhook: ${{ secrets.DISCORD_HATCH_ANNOUNCEMENTS }}
16+
nodetail: true
17+
# No content field = no mention for pre-releases
18+
title: "🧪 Hatch Pre-release Available for Testing"
19+
description: |
20+
**Version `${{ github.event.release.tag_name }}`** is now available for testing!
21+
22+
⚠️ **This is a pre-release** - expect potential bugs and breaking changes
23+
🔬 Perfect for testing new features and providing feedback
24+
📋 Click [here](${{ github.event.release.html_url }}) to view what's new and download
25+
26+
Help us make *Hatch!* better by testing and reporting [issues](https://github.com/CrackingShells/Hatch/issues)! 🐛➡️✨
27+
color: 0xff9500 # Orange color for pre-release
28+
username: "Cracking Shells Pre-release Bot"
29+
image: "https://github.com/CrackingShells/.github/blob/main/resources/images/hatch_icon_dark_bg_transparent.png"
30+
avatar_url: "https://github.com/CrackingShells/.github/blob/main/resources/images/cs_core_dark_bg.png"
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Discord Release Notification
2+
3+
on:
4+
release:
5+
types: [released]
6+
7+
jobs:
8+
notify-discord:
9+
runs-on: ubuntu-latest
10+
if: github.event.release.target_commitish == 'main'
11+
steps:
12+
- name: Send Discord Notification
13+
uses: sarisia/actions-status-discord@v1
14+
with:
15+
webhook: ${{ secrets.DISCORD_HATCH_ANNOUNCEMENTS }}
16+
nodetail: true
17+
content: "<@&1418053865818951721>"
18+
title: "🎉 New *Hatch!* Release Available!"
19+
description: |
20+
**Version `${{ github.event.release.tag_name }}`** has been released!
21+
22+
🚀 Get the latest features and improvements
23+
📚 Click [here](${{ github.event.release.html_url }}) to view the changelog and download
24+
25+
Happy MCP coding with *Hatch!* 🐣
26+
color: 0x00ff88
27+
username: "Cracking Shells Release Bot"
28+
image: "https://github.com/CrackingShells/.github/blob/main/resources/images/hatch_icon_dark_bg_transparent.png"
29+
avatar_url: "https://github.com/CrackingShells/.github/blob/main/resources/images/cs_core_dark_bg.png"

0 commit comments

Comments
 (0)