Skip to content

Commit

Permalink
Teams release
Browse files Browse the repository at this point in the history
  • Loading branch information
metelkin committed Jan 27, 2025
1 parent 243b749 commit d98750a
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/release-notify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Notify Teams on Release

on:
release:
types: [published]

jobs:
notify-teams:
runs-on: ubuntu-latest

steps:
- name: Send notification to Microsoft Teams
env:
WEBHOOK_URL: ${{ secrets.TEAMS_WEBHOOK }}
RELEASE_TAG: ${{ github.event.release.tag_name }}
RELEASE_NAME: ${{ github.event.release.name }}
RELEASE_BODY: ${{ github.event.release.body }}
REPO_NAME: ${{ github.repository }}
REPO_URL: ${{ github.event.repository.html_url }}
RELEASE_URL: ${{ github.event.release.html_url }}
run: |
curl -X POST -H "Content-Type: application/json" \
-d "{
\"text\": \"🚀 A new release has been published!\",
\"sections\": [{
\"activityTitle\": \"**Release: [${RELEASE_NAME}](${RELEASE_URL})**\",
\"activitySubtitle\": \"Repository: [${REPO_NAME}](${REPO_URL})\",
\"text\": \"${RELEASE_BODY}\"
}]
}" \
$WEBHOOK_URL

0 comments on commit d98750a

Please sign in to comment.