Plugin: provider-gitlab
Publishes releases to GitLab. It supports GitLab.com and self-hosted GitLab instances through a configurable base URL.
Installation
Section titled “Installation”Binary
Section titled “Binary”semrel plugin install @semrel/provider-gitlabsemrel 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/provider-gitlab:latestVerify the image signature with cosign:
cosign verify ghcr.io/semrels/provider-gitlab:latest \ --certificate-identity-regexp 'https://github.com/SemRels/provider-gitlab/.github/workflows/release.yml.*' \ --certificate-oidc-issuer https://token.actions.githubusercontent.comConfiguration
Section titled “Configuration”version: 1plugins: - uses: @semrel/provider-gitlab args: # token is read from SEMREL_PLUGIN_TOKEN env var base_url: 'https://gitlab.com' project_id: 12345678 milestone: v1.4.0Environment Variables
Section titled “Environment Variables”| Name | Required | Default | Description |
|---|---|---|---|
SEMREL_PLUGIN_TOKEN | no | — | GitLab private token (PRIVATE-TOKEN header). Takes precedence over job-token auth. |
SEMREL_PLUGIN_JOB_TOKEN | no | — | Explicit GitLab CI job token (JOB-TOKEN header) when no private token is configured. |
SEMREL_PLUGIN_USE_JOB_TOKEN | no | false | Opt into CI_JOB_TOKEN authentication in GitLab CI. |
SEMREL_PLUGIN_BASE_URL | no | https://gitlab.com | Base URL for the GitLab instance. |
SEMREL_PLUGIN_PROJECT_ID | no | current project | Numeric or URL-encoded project identifier. |
SEMREL_PLUGIN_MILESTONE | no | — | Optional milestone to associate with the release. |
SEMREL_PLUGIN_COMMENT_ON_MRS | no | true | Post an idempotent release notification comment on merge requests included in the release (SEMREL_COMMIT_HASHES). |
Release Context Variables
Section titled “Release Context Variables”SEMREL_TAG_NAMESEMREL_NEXT_VERSIONSEMREL_CURRENT_VERSIONSEMREL_CHANGELOGSEMREL_COMMIT_HASHESSEMREL_DRY_RUN
Behavior
Section titled “Behavior”For v1.4.0, the provider can create a GitLab release tied to the tag, attach the changelog text, and link the configured milestone.