Discord Release Webhook
ActionsTags
(1)A GitHub Action to post beautiful release announcements to Discord via webhooks.
- Rich Discord Embeds: Automatically includes repository info, branch, and commit details
- Fully Customizable: Configure colors, messages, username, and avatar
- Easy to Use: Simple YAML configuration with sensible defaults
- Type-Safe: Built with TypeScript for reliability
- Well Tested: Comprehensive test coverage
name: Discord Release Notification
on:
release:
types: [published]
jobs:
notify:
runs-on: ubuntu-latest
steps:
- uses: lettermint/action-discord-releases@v1
with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL }}| Input | Description | Required | Default |
|---|---|---|---|
webhook_url |
Discord webhook URL (use secrets!) | Yes | - |
color |
Embed color in hex (without #) | No | 8892be |
username |
Webhook username override | No | GitHub Release |
avatar_url |
Webhook avatar URL | No | Package emoji 📦 |
content |
Message content (appears above embed) | No | A new release is now available! |
footer |
Footer text | No | Powered by Lettermint · lettermint.co |
name: Discord Release Notification
on:
release:
types: [published]
jobs:
notify:
runs-on: ubuntu-latest
steps:
- uses: lettermint/action-discord-releases@v1
with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL }}- uses: lettermint/action-discord-releases@v1
with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL }}
color: '00ff00' # Green
content: '🎉 New release v${{ github.ref_name }} is live!'
footer: 'Released by ${{ github.actor }}'name: Discord Push Notification
on:
push:
branches:
- main
jobs:
notify:
runs-on: ubuntu-latest
steps:
- uses: lettermint/action-discord-releases@v1
with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL }}
content: 'New commit pushed to main!'
color: '5865F2'- uses: lettermint/action-discord-releases@v1
with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL }}
username: 'My Bot'
avatar_url: 'https://example.com/my-avatar.png'
content: 'Release announcement from My Company'
footer: 'My Company © 2025'- Go to your Discord server settings
- Navigate to Integrations → Webhooks
- Click New Webhook
- Configure the webhook name and channel
- Click Copy Webhook URL
- Add the URL to your GitHub repository secrets:
- Go to your repo → Settings → Secrets and variables → Actions
- Click New repository secret
- Name:
DISCORD_WEBHOOK_URL - Value: Paste your webhook URL
The Discord message includes:
- Title: Repository name (links to repository)
- Color: Customizable hex color
- Timestamp: Current time (ISO 8601)
- Fields:
- 📦 Repository: Link to repository
- 🌿 Branch: Current branch or tag
- 🔗 Commit: Link to commit with short SHA
- Footer: Customizable footer text
Colors are specified in hex format (without the # prefix):
| Color | Hex | Preview |
|---|---|---|
| Discord Blurple | 5865F2 |
🟦 |
| Green | 57F287 |
🟩 |
| Yellow | FEE75C |
🟨 |
| Red | ED4245 |
🟥 |
| White | FFFFFF |
⬜ |
| Black | 000000 |
⬛ |
Tip: Use a color picker to find hex values.
- Node.js 20+
- npm 9+
# Clone the repository
git clone https://github.com/lettermint/action-discord-releases.git
cd action-discord-releases
# Install dependencies
npm install
# Run tests
npm test
# Lint code
npm run lint
# Format code
npm run format
# Build and package
npm run all- TypeScript Compilation:
npm run buildcompiles TypeScript tolib/ - Bundling:
npm run packageuses@vercel/nccto bundle everything intodist/index.js - Commit: The
dist/directory must be committed (required by GitHub Actions)
Run the test suite:
npm testTests include:
- Hex to decimal color conversion
- Branch name extraction
- Discord embed structure validation
- Webhook URL validation
- Error handling (400, 429 responses)
- Edit source code in
src/main.ts - Update tests in
__tests__/main.test.ts - Run
npm run allto build, test, lint, and package - Commit both source and
dist/changes
- Never hardcode webhook URLs: Always use GitHub Secrets
- Webhook validation: The action validates Discord webhook URLs
- Error handling: Sensitive data is not exposed in error messages
- Dependencies: Minimal dependencies, all from trusted sources (@actions/*)
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes with tests
- Run
npm run allto ensure everything passes - Submit a pull request
MIT License - see LICENSE for details
- Issues: GitHub Issues
Made with ❤️ by Lettermint · lettermint.co
Discord Release Webhook is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.