Skip to content

Commit

Permalink
Notify Slack channel about upcoming releases (#5197)
Browse files Browse the repository at this point in the history
## Problem

When the next release is coming, we want to let everyone know about it by
posting a message to the Slack channel with a list of commits.

## Summary of changes
- `.github/workflows/release-notify.yml` is added
- the workflow sends a message to
`vars.SLACK_UPCOMING_RELEASE_CHANNEL_ID` (or
[#test-release-notifications](https://neondb.slack.com/archives/C05QQ9J1BRC)
if not configured)
- On each PR update, the workflow updates the list of commits in the
message (it doesn't send additional messages)
  • Loading branch information
bayandin committed Sep 11, 2023
1 parent 07d7874 commit 698776a
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/release-notify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Notify Slack channel about upcoming release

concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}
cancel-in-progress: true

on:
pull_request:
branches:
- release
types:
# Default types that triggers a workflow:
# - https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
- opened
- synchronize
- reopened
# Additional types that we want to handle:
- closed

jobs:
notify:
runs-on: [ ubuntu-latest ]

steps:
- uses: neondatabase/dev-actions/release-pr-notify@main
with:
slack-token: ${{ secrets.SLACK_BOT_TOKEN }}
slack-channel-id: ${{ vars.SLACK_UPCOMING_RELEASE_CHANNEL_ID || 'C05QQ9J1BRC' }} # if not set, then `#test-release-notifications`
github-token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 698776a

Please sign in to comment.