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.
Installation
Section titled “Installation”Binary
Section titled “Binary”semrel plugin install @semrel/hook-matrixsemrel plugin install downloads the binary to .semrel/plugins/ and updates .semrel.lock. Commit .semrel.lock to pin the version for your team.
Docker
Section titled “Docker”Pre-built, signed multi-platform images (linux/amd64, linux/arm64) are published on every release:
docker pull ghcr.io/semrels/hook-matrix:latestVerify the image signature with cosign:
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.comConfiguration
Section titled “Configuration”version: 1plugins: - 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 }}'Environment Variables
Section titled “Environment Variables”| Name | Required | Default | Description |
|---|---|---|---|
SEMREL_PLUGIN_HOMESERVER | yes | — | Matrix homeserver base URL. |
SEMREL_PLUGIN_TOKEN | yes | — | Access token used to send messages. |
SEMREL_PLUGIN_ROOM_ID | yes | — | Destination room ID, such as !room:server. |
SEMREL_PLUGIN_MESSAGE_TEMPLATE | no | plugin-defined | Optional Matrix message template. |
Release Context Variables
Section titled “Release Context Variables”SEMREL_TAG_NAMESEMREL_NEXT_VERSIONSEMREL_CURRENT_VERSIONSEMREL_BUMPSEMREL_BRANCHSEMREL_CHANGELOGSEMREL_DRY_RUN
Example Output
Section titled “Example Output”A release can post a message like Released v1.4.0 from main followed by the generated changelog into the configured Matrix room.