The Release Notification workflow automatically sends Slack notifications when releases are deployed to the main branch. This ensures the team is informed about new releases and can track what changes were included.
- ✅ Automatic release notifications when code is pushed to main branch
- ✅ Manual trigger support with test mode toggle
- ✅ Label-based testing with
test-release-notificationlabel - ✅ Jira ticket integration - extracts and links Jira tickets in notifications
- ✅ PR information extraction - shows what changes were included in the release
- ✅ Test mode support - uses separate webhook for testing
- Trigger: Push to main branch
- Action: Send Slack notification to production channel
- Purpose: Notify team about new releases
- Trigger: Manual workflow dispatch
- Action: Send notification (test or production based on input)
- Purpose: Test the workflow functionality
- Trigger: Add
test-release-notificationlabel to any PR - Action: Send test notification to test channel
- Purpose: Test notifications without affecting production
The workflow triggers on these events:
pushtomainbranch (production)pull_requestwithlabeledtype (whentest-release-notificationlabel is added)workflow_dispatch(manual trigger with test mode option)
- Condition: Push to main branch OR manual trigger without test mode
- Webhook:
SLACK_WEBHOOK_URL(production channel) - Notification: Standard release notification
- Condition: Manual trigger with test mode checked OR
test-release-notificationlabel - Webhook:
SLACK_WEBHOOK_URL_TEST(test channel) - Notification: Release notification with
(TEST MODE)prefix
flowchart TD
A[Workflow Triggered] --> B{Trigger Type?}
B -->|Push to main| C[Production Mode]
B -->|Manual + Test Mode| D[Test Mode]
B -->|Manual + No Test| C
B -->|Label Added| D
C --> E[Use Production Webhook]
D --> F[Use Test Webhook]
E --> G[Extract PR Information]
F --> G
G --> H[Format Slack Message]
H --> I[Send Notification]
I --> J[End]
flowchart TD
A[Workflow Triggered] --> B{Test Mode?}
B -->|Manual + Test Checked| C[Test Mode]
B -->|test-release-notification Label| C
B -->|Push to main| D[Production Mode]
B -->|Manual + No Test| D
C --> E[Use Test Webhook + TEST MODE prefix]
D --> F[Use Production Webhook]
E --> G[End]
F --> G
The workflow expects these labels to exist in the repository:
test-release-notification- For testing release notifications (optional)
The workflow sends formatted Slack notifications with:
- Repository Info - Repository name, branch, commit SHA
- Test URLs - Links to staging and production environments
- Changes in Release - List of PRs and Jira tickets included
- Test Mode -
(TEST MODE)prefix for test notifications
- Regular notifications → Production Slack channel (via
SLACK_WEBHOOK_URL) - Test notifications → Test Slack channel (via
SLACK_WEBHOOK_URL_TEST) - Test mode detection → Uses
test-release-notificationlabel or manual test mode input
Required secrets in repository settings:
SLACK_WEBHOOK_URL- Production Slack webhook (main channel)SLACK_WEBHOOK_URL_TEST- Test Slack webhook (test channel)
The workflow requires these permissions:
contents: read- To read repository contentspull-requests: read- To read PR details and extract information
1. Code pushed to main branch
2. Workflow triggers automatically
3. Extracts recent PRs and Jira tickets
4. Sends notification to production channel
1. Go to Actions → "Simple Release Notification"
2. Click "Run workflow"
3. Check "Test mode" checkbox
4. Click "Run workflow"
5. Notification sent to test channel with (TEST MODE) prefix
1. Add "test-release-notification" label to any PR
2. Workflow triggers automatically
3. Notification sent to test channel with (TEST MODE) prefix
4. Remove label to stop testing
-
Workflow not triggering on push to main
- Cause: Missing or invalid webhook URL
- Solution: Check
SLACK_WEBHOOK_URLsecret in repository settings
-
Test mode not working
- Cause: Missing test webhook URL or incorrect label
- Solution: Check
SLACK_WEBHOOK_URL_TESTsecret and ensure label istest-release-notification
-
No PR information in notification
- Cause: No recent merge commits or API rate limiting
- Solution: Check GitHub API limits and recent commit history
-
Wrong webhook used
- Cause: Incorrect test mode detection logic
- Solution: Verify label name and manual trigger test mode input
The workflow logs detailed information:
- Trigger type (push, manual, label)
- Test mode status
- Webhook URL being used
- PR information extracted
- Notification status
.github/workflows/
└── slack-release-notification.yml # Release notification workflow
RELEASE-NOTIFICATION-DOCUMENTATION.md # This documentation
-
Test Label-Based Trigger
- Add
test-release-notificationlabel to any PR - Check Actions tab for workflow run
- Verify notification sent to test channel
- Add
-
Test Manual Trigger
- Go to Actions → "Simple Release Notification"
- Click "Run workflow"
- Test both with and without "Test mode" checked
-
Test Production Trigger
- Make a test commit to main branch
- Verify notification sent to production channel
- Workflow triggers on push to main
- Workflow triggers on manual dispatch
- Workflow triggers on label addition
- Test mode uses correct webhook
- Production mode uses correct webhook
- Notifications include PR information
- Jira tickets are extracted and linked
- Test mode shows (TEST MODE) prefix
- Add trigger to
onsection in workflow - Update condition logic in
ifstatement - Test with appropriate events
- Update documentation
- Update Slack message template in workflow
- Test with both production and test modes
- Update documentation examples
- Use
test-release-notificationlabel for safe testing - Test with manual trigger and test mode
- Verify both webhook URLs work correctly
- Test PR information extraction