Plugin: hook-teams
Sends release notifications to Microsoft Teams via Incoming Webhooks. Use it to share new versions and changelog highlights with your team in a Teams channel.
Installation
Section titled “Installation”go install github.com/SemRels/hook-teams@latestEach plugin is a standalone Go binary. Keep it on your PATH or reference it with path: in .semrel.yaml. If you keep secrets in a .env file, load them with semrel --env-file .env release.
Configuration
Section titled “Configuration”plugins: - uses: hook-teams args: webhook_url: "https://your-tenant.webhook.office.com/webhookb2/..." title: "🚀 New Release" # optional theme_color: "0078D7" # optional, hex without # mention: "user@example.com" # optional, Teams user to @mentionEnvironment Variables
Section titled “Environment Variables”| Name | Required | Default | Description |
|---|---|---|---|
SEMREL_PLUGIN_WEBHOOK_URL | yes | — | Microsoft Teams Incoming Webhook URL. |
SEMREL_PLUGIN_TITLE | no | 🚀 New Release | Card title shown in the Teams message. |
SEMREL_PLUGIN_THEME_COLOR | no | 0078D7 | Hex colour (without #) for the card accent. |
SEMREL_PLUGIN_MENTION | no | — | Email address of a Teams user to @mention. |
Getting a Webhook URL
Section titled “Getting a Webhook URL”- In Teams, open the target channel → ··· → Connectors
- Search for Incoming Webhook → Configure
- Give it a name (e.g.
semrel) and optionally upload an icon - Copy the generated webhook URL and store it as a secret
Release Context Variables
Section titled “Release Context Variables”SEMREL_VERSIONSEMREL_TAG_NAMESEMREL_NEXT_VERSIONSEMREL_CHANGELOGSEMREL_DRY_RUN
Dry-Run Behaviour
Section titled “Dry-Run Behaviour”When SEMREL_DRY_RUN=true, the plugin prints what it would send and exits 0 without making any HTTP calls:
hook-teams: [dry-run] would send Teams notification for v1.4.0Example Output
Section titled “Example Output”A successful release posts an adaptive card to your Teams channel showing the version number, release branch, and the generated changelog.