Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add release-notify-slack workflow #9

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/release-notify-slack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Notify Dev DX Channel on Release

on:
release:
types: [published]
# if: github-token.repository == 'linode/linode_api4-python'
steps:
- name: Notify Slack - Main Message
id: main_message
uses: slackapi/[email protected]
with:
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
payload: |
{
"text": "*New Release Published in ${{ github.repository }}!*",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*<${{ github.event.release.html_url }}|${{ github.repository }}: ${{ github.event.release.tag_name }}>* is now live! :tada:"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

- name: Notify Slack - Threaded Release Notes
uses: slackapi/[email protected]
with:
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
payload: |
{
"thread_ts": "${{ steps.main_message.outputs.ts }}",
"text": "Release Notes:\n${{ github.event.release.body }}"
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}