release-notes (GitLab CI component)
Publishes a GitLab Release for a tag, with notes composed from commits since the previous tag.
The component uses release-cli
under the hood. Unlike GitHub’s --generate-notes, GitLab has no native
auto-notes feature, so this component composes a simple bullet list of commit
subjects between the previous tag and the current tag.
Inputs
| Name | Required | Default | Description |
|---|---|---|---|
image | no | registry.gitlab.com/gitlab-org/release-cli:latest | Container image with release-cli + git. |
stage | no | .post | Pipeline stage for the release-notes job. |
Example
# .gitlab-ci.yml
include:
- component: gitlab.com/driftsys/ci/release-notes@~latest
Notes
- The job only runs on tag pipelines (
$CI_COMMIT_TAGis set). - Notes are composed from
git log --pretty='- %s' PREV..TAG. If no previous tag exists, the full history up to the tag is used. - This component intentionally uses the upstream
release-cliimage rather than adriftsys/dockimage, since the dock catalogue doesn’t shiprelease-clitoday. - The pipeline must be able to fetch full history (
GIT_DEPTH: 0) sogit describecan find the previous tag.