Skip to content

Plugin: hook-email

Sends release notifications through SMTP after a SemRel run. It can deliver version, branch, and changelog details to release managers or stakeholder mailing lists.

Terminal window
go install github.com/SemRels/hook-email@latest

Each 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.

version: 1
plugins:
- name: hook-email
path: hook-email
args:
smtp_host: smtp.example.com
smtp_port: 587
smtp_user: '${{ env.SMTP_USER }}'
smtp_pass: '${{ env.SMTP_PASS }}'
from: 'releases@example.com'
to: 'team@example.com,ops@example.com'
subject_template: 'Release {{ .TagName }} is live'
NameRequiredDefaultDescription
SEMREL_PLUGIN_SMTP_HOSTyesSMTP server hostname.
SEMREL_PLUGIN_SMTP_PORTno587SMTP server port.
SEMREL_PLUGIN_SMTP_USERyesSMTP username.
SEMREL_PLUGIN_SMTP_PASSyesSMTP password or app password.
SEMREL_PLUGIN_FROMyesSender email address.
SEMREL_PLUGIN_TOyesComma-separated list of recipient email addresses.
SEMREL_PLUGIN_SUBJECT_TEMPLATEnoplugin-definedOptional subject template for the release email.
SEMREL_PLUGIN_TLSnotrueEnable or disable TLS for the SMTP connection.
  • SEMREL_TAG_NAME
  • SEMREL_NEXT_VERSION
  • SEMREL_CURRENT_VERSION
  • SEMREL_BUMP
  • SEMREL_BRANCH
  • SEMREL_CHANGELOG
  • SEMREL_DRY_RUN

A successful run can send an email with a subject such as Release v1.4.0 is live and a body that includes the bump level, branch, and generated changelog.