https://github.com/eddmann/slack-release-notifier
Used at MyBuilder to notify the team upon successful deployment of a GitHub release.
https://github.com/eddmann/slack-release-notifier
Last synced: 12 months ago
JSON representation
Used at MyBuilder to notify the team upon successful deployment of a GitHub release.
- Host: GitHub
- URL: https://github.com/eddmann/slack-release-notifier
- Owner: eddmann
- Created: 2021-04-22T12:42:32.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2023-03-24T10:54:40.000Z (over 3 years ago)
- Last Synced: 2025-01-23T03:26:42.993Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://tech.mybuilder.com/using-github-actions-to-send-gone-live-release-notes-via-email-and-slack/
- Size: 578 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Slack Release Notifier
Used at [MyBuilder](https://www.mybuilder.com/) to notify the team upon successful deployment of a GitHub release.
## Usage
We use [Release Drafter](https://github.com/release-drafter/release-drafter) to compile the release notes based on merged pull requests.
Once this draft release has been published and a successful deployment has occurred, this GitHub Action is invoked which notifies the team via a dedicated Slack channel.
As the release notes include the contributing GitHub usernames, we are able to lookup the associated Slack member identities and _mention_ them directly within the release notification.
This provides a trivial means of making interested parities aware of the changes that have just gone live.
```yaml
name: Notify Team via Slack about Release
on: deployment_status
jobs:
notify:
if: ${{ github.event.deployment_status.state == 'success' }}
runs-on: ubuntu-20.04
steps:
- name: Notify Team
uses: eddmann/slack-release-notifier@v1
with:
slackTitle: 'Your changes are live!'
slackHeading: 'Gone Live - {tag_name}'
gitHubSlackUserLookup: '{"@GitHubUsername":"SlackMemberId"}'
slackWebhookEndpointUrl: ${{ secrets.RELEASE_SLACK_WEBHOOK_URL }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
Alternatively, you can emit the notification upon the release being published.
```yaml
name: Notify Team via Slack about Release
on:
release:
types: [published]
jobs:
notify:
runs-on: ubuntu-20.04
steps:
- name: Notify Team
uses: eddmann/slack-release-notifier@v1
with:
slackTitle: 'Your changes are live!'
slackHeading: 'Gone Live - {tag_name}'
gitHubSlackUserLookup: '{"@GitHubUsername":"SlackMemberId"}'
slackWebhookEndpointUrl: ${{ secrets.RELEASE_SLACK_WEBHOOK_URL }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```