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
semrel plugin install @semrel/hook-matrix

semrel plugin install downloads the binary to .semrel/plugins/ and updates .semrel.lock. Commit .semrel.lock to pin the version for your team.

Pre-built, signed multi-platform images (linux/amd64, linux/arm64) are published on every release:

Terminal window
docker pull ghcr.io/semrels/hook-matrix:latest

Verify the image signature with cosign:

Terminal window
cosign verify ghcr.io/semrels/hook-matrix:latest \
--certificate-identity-regexp 'https://github.com/SemRels/hook-matrix/.github/workflows/release.yml.*' \
--certificate-oidc-issuer https://token.actions.githubusercontent.com
version: 1
plugins:
- uses: @semrel/hook-matrix
args:
homeserver: 'https://matrix.example.com'
# token is read from SEMREL_PLUGIN_TOKEN env var
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.