Skip to content

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.

Terminal window
go install github.com/SemRels/hook-gitplugin@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-gitplugin
path: hook-gitplugin
args:
repo: 'https://github.com/SemRels/release-mirror.git'
branch: main
token: '${{ env.GITPLUGIN_TOKEN }}'
NameRequiredDefaultDescription
SEMREL_PLUGIN_REPOyesGit repository URL or path to update.
SEMREL_PLUGIN_BRANCHnomainTarget branch to push.
SEMREL_PLUGIN_TOKENnoOptional token for authenticated pushes.
  • SEMREL_TAG_NAME
  • SEMREL_NEXT_VERSION
  • SEMREL_BRANCH
  • SEMREL_CHANGELOG
  • SEMREL_DRY_RUN

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.