Plugin: hook-gitplugin
Pushes release-related changes to another Git repository or branch. Use it when SemRel needs to mirror release metadata into a different checkout or automation repository.
Installation
Section titled “Installation”Binary
Section titled “Binary”semrel plugin install @semrel/hook-gitpluginsemrel 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/release-mirror:latestVerify the image signature with cosign:
cosign verify ghcr.io/semrels/release-mirror:latest \ --certificate-identity-regexp 'https://github.com/SemRels/release-mirror/.github/workflows/release.yml.*' \ --certificate-oidc-issuer https://token.actions.githubusercontent.comConfiguration
Section titled “Configuration”version: 1plugins: - uses: @semrel/hook-gitplugin args: repo: 'https://github.com/SemRels/release-mirror.git' branch: main # token is read from SEMREL_PLUGIN_TOKEN env varEnvironment Variables
Section titled “Environment Variables”| Name | Required | Default | Description |
|---|---|---|---|
SEMREL_PLUGIN_REPO | yes | — | Git repository URL or path to update. |
SEMREL_PLUGIN_BRANCH | no | main | Target branch to push. |
SEMREL_PLUGIN_TOKEN | no | — | Optional token for authenticated pushes. |
Release Context Variables
Section titled “Release Context Variables”SEMREL_TAG_NAMESEMREL_NEXT_VERSIONSEMREL_BRANCHSEMREL_CHANGELOGSEMREL_DRY_RUN
Behavior
Section titled “Behavior”For a v1.4.0 release, the hook can clone the configured repository, update release artifacts on main, and push the resulting commit after SemRel finishes successfully.