Skip to content

Plugin: hook-matrix

Posts release notifications to a Matrix room. It works well for teams using Matrix or Element for release coordination and status updates.

Terminal window
go install github.com/SemRels/hook-matrix@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-matrix
path: hook-matrix
args:
homeserver: 'https://matrix.example.com'
token: '${{ env.MATRIX_TOKEN }}'
room_id: '!release:matrix.example.com'
message_template: 'Released {{ .TagName }} from {{ .Branch }}'
NameRequiredDefaultDescription
SEMREL_PLUGIN_HOMESERVERyesMatrix homeserver base URL.
SEMREL_PLUGIN_TOKENyesAccess token used to send messages.
SEMREL_PLUGIN_ROOM_IDyesDestination room ID, such as !room:server.
SEMREL_PLUGIN_MESSAGE_TEMPLATEnoplugin-definedOptional Matrix message template.
  • SEMREL_TAG_NAME
  • SEMREL_NEXT_VERSION
  • SEMREL_CURRENT_VERSION
  • SEMREL_BUMP
  • SEMREL_BRANCH
  • SEMREL_CHANGELOG
  • SEMREL_DRY_RUN

A release can post a message like Released v1.4.0 from main followed by the generated changelog into the configured Matrix room.