Skip to content

jeffersfp/github-release-slack-notification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ GitHub Release Slack Notification

GitHub release License: MIT

Automated Slack notifications for GitHub releases - perfect for teams and SDK announcements. This GitHub Action sends beautifully formatted Slack messages when you publish a new release, keeping your team instantly informed.

✨ Features

  • 🎨 Rich Slack formatting with blocks and markdown support
  • πŸ“ Automatic markdown conversion from release notes to Slack format
  • 🏷️ Pre-release support with visual indicators
  • πŸ‘₯ Team mentions to notify specific users
  • ⚑ Zero configuration - works out of the box
  • πŸ”— Direct links to release notes and repository
  • πŸ“¦ Smart truncation for long release notes

πŸ“‹ Prerequisites

You'll need a Slack Webhook URL. To create one:

  1. Go to Slack API
  2. Create a new app or select an existing one
  3. Navigate to Incoming Webhooks and activate it
  4. Click Add New Webhook to Workspace
  5. Select the channel where notifications should be posted
  6. Copy the webhook URL

πŸš€ Usage

Basic Example

name: Release Notifications

on:
  release:
    types: [published]

jobs:
  notify-slack:
    runs-on: ubuntu-latest
    steps:
      - name: Send Slack Notification
        uses: jeffersfp/github-release-slack-notification@v0.1.1
        with:
          slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}

Advanced Example with Mentions

name: Release Notifications

on:
  release:
    types: [published, created]

jobs:
  notify-slack:
    runs-on: ubuntu-latest
    steps:
      - name: Send Slack Notification
        uses: jeffersfp/github-release-slack-notification@v0.1.1
        with:
          slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
          mentions: 'U1234567890,U0987654321'

Without Changelog

name: Release Notifications

on:
  release:
    types: [published]

jobs:
  notify-slack:
    runs-on: ubuntu-latest
    steps:
      - name: Send Slack Notification
        uses: jeffersfp/github-release-slack-notification@v0.1.1
        with:
          slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
          include-changelog: 'false'

βš™οΈ Inputs

Input Description Required Default
slack-webhook-url Slack webhook URL for sending notifications βœ… Yes -
include-changelog Whether to include the release changelog in the message ❌ No true
mentions Comma-separated list of Slack user IDs to mention ❌ No -

Getting Slack User IDs

To mention users, you need their Slack user ID (not username):

  1. In Slack, click on a user's profile
  2. Click More (three dots)
  3. Select Copy member ID
  4. Use the ID in the format: U1234567890

You can specify multiple users: U1234567890,U0987654321,U1122334455

πŸ“€ Outputs

Output Description
message-sent Whether the message was sent successfully (true or false)
slack-response Response from Slack API

πŸ“ Message Format

The action sends a rich, formatted message including:

  • 🏷️ Release type (Stable or Pre-release)
  • πŸ“¦ Version/tag name
  • πŸ‘€ Release author
  • πŸ“… Publication date
  • πŸ”— Links to release notes and repository
  • πŸ“„ Formatted release body (converted from markdown)
  • πŸ‘₯ Optional team mentions

Example Message Preview

πŸš€ New Release: my-awesome-project

πŸ“¦ Version: v1.2.0
πŸ‘€ Released by: jeffersfp
πŸ“… Published on: 11/14/2025, 2:30:45 PM

🏷️ Release Type: Stable Release
πŸ”— Release Notes: View Release Notes
πŸ”— Repository: owner/my-awesome-project

────────────────────────────────

## What's New
- Added new feature X
- Fixed bug Y
- Improved performance

────────────────────────────────

πŸ‘₯ Team Notification: @john @jane

πŸ”’ Security

Important: Never commit your Slack webhook URL directly in your workflow file. Always use GitHub Secrets:

  1. Go to your repository Settings > Secrets and variables > Actions
  2. Click New repository secret
  3. Name: SLACK_WEBHOOK_URL
  4. Value: Your webhook URL
  5. Reference it as ${{ secrets.SLACK_WEBHOOK_URL }}

πŸ› οΈ Development

Building from Source

# Install dependencies
npm install

# Build the action
npm run build

# Verify distribution is up to date
npm run check-dist

Making a Release

We use an automated release process. Simply run:

npm run prepare-release

This interactive tool will:

  • Build distribution files
  • Prompt for version bump type (patch/minor/major)
  • Commit and push changes
  • Trigger automated release via GitHub Actions

For more details, see RELEASE.md.

Project Structure

β”œβ”€β”€ .github/workflows/   # CI/CD automation
β”œβ”€β”€ action.yaml          # Action metadata
β”œβ”€β”€ src/
β”‚   └── index.js        # Main action code
β”œβ”€β”€ dist/
β”‚   └── index.js        # Bundled distribution
β”œβ”€β”€ scripts/
β”‚   └── prepare-release.js  # Release automation
β”œβ”€β”€ examples/
β”‚   └── workflow.yaml   # Example workflow
└── package.json        # Node.js dependencies

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Contributor Guidelines

  1. Fork and clone the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes in src/ (not dist/)
  4. Build distribution: npm run build
  5. Commit: git commit -m 'feat: add amazing feature'
  6. Push: git push origin feature/amazing-feature
  7. Open a Pull Request

The CI workflow will automatically verify your changes build correctly.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

πŸ“Š Support

If you find this action helpful, please consider:

  • ⭐ Starring the repository
  • πŸ› Reporting issues
  • πŸ’‘ Suggesting new features
  • πŸ”€ Contributing code improvements

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors