fix(release): use inline presetConfig for release-notes-generator

Problem

The release:prepare job fails during the generateNotes step with:

TypeError: Invalid date
    at dateformat (load-changelog-config.js:30:107)

See failed job: https://gitlab.com/gitlab-org/container-registry/-/jobs/13099243605

Root Cause

!2753 (merged) configured @semantic-release/release-notes-generator to use .conventional-changelog.js via the config option. Unfortunately, semantic-release and conventional-changelog-cli have different expectations for config files:

  • conventional-changelog-cli accepts a plain object export (what .conventional-changelog.js provides)
  • @semantic-release/release-notes-generator expects the config option to point to a preset module that exports a function

This mismatch causes the committerDate field to be passed as an empty object {} instead of a date string, which makes dateformat throw "Invalid date".

Since make release-dry-run uses conventional-changelog-cli (which works fine with the config), the issue only surfaced in CI where semantic-release is used.

Fix

This MR:

  1. Fixes .releaserc.yml - Uses inline preset and presetConfig options, which is the supported way to customize the conventionalcommits preset for semantic-release

  2. Creates .changelog.config.js - A proper config file for conventional-changelog-cli using writerOpts.transform to include build/refactor commits and apply custom emoji section headers

  3. Updates CI jobs to use the new config file with -n ./.changelog.config.js

  4. Adds release:dry-run job - For testing release configuration changes without side effects

  5. Refactors release CI configuration:

    • Extracts common config to .gitlab/ci/release_common.yml
    • Defines package versions as CI variables (single source of truth)
    • Creates reusable base configurations (.release_base, .release_push_base, .release_test_base)
  6. Removes .conventional-changelog.js - No longer needed

Notes

The type-to-section mapping is defined in two places:

  • .releaserc.yml (for semantic-release)
  • .changelog.config.js (for conventional-changelog-cli)

Both files have comments pointing to each other. If you update the types in one, update the other too.

Edited by Hayley Swimelar

Merge request reports

Loading