Skip to content

ci: fix release notes generation in release workflow#427

Merged
veeso merged 1 commit into
mainfrom
ci/fix-release-workflow
Jun 7, 2026
Merged

ci: fix release notes generation in release workflow#427
veeso merged 1 commit into
mainfrom
ci/fix-release-workflow

Conversation

@veeso
Copy link
Copy Markdown
Owner

@veeso veeso commented Jun 7, 2026

Fixes the dry-run failure in run 27096060211 (prepare job, 11s).

Root cause

git-cliff --latest --strip header crashed:

trim_start_matches was called on null but expected a String

Two compounding causes:

  1. Shallow checkoutactions/checkout defaults to fetch-depth: 1, so git-cliff saw 1 commit and no tags → no release exists → version is null → template crash. Also would have produced a near-empty CHANGELOG.
  2. --latest is the wrong selector — it picks the last real git tag (v1.0.0 → stale notes), not the version being released.

Fix

  • prepare checkout: fetch-depth: 0 + fetch-tags: true.
  • release notes: git-cliff --unreleased --tag v$VERSION --strip header — renders exactly the commits in the version being released.

Verified locally: --unreleased --tag v1.0.1 emits ## 1.0.1 with the correct commits. zizmor clean, YAML valid.

prepare job failed: git-cliff --latest crashed with 'trim_start_matches on
null' because the checkout was shallow (no tags/history) so no release existed.

- checkout prepare with fetch-depth: 0 + fetch-tags so git-cliff sees full
  history and tags (also fixes an otherwise-truncated CHANGELOG)
- generate release notes with --unreleased --tag v$VERSION instead of --latest:
  --latest selected the previous real tag (stale notes); --unreleased --tag
  renders the version being released
@veeso veeso force-pushed the ci/fix-release-workflow branch from 8f2775e to 3c7284d Compare June 7, 2026 17:04
@cocogitto-bot
Copy link
Copy Markdown

cocogitto-bot Bot commented Jun 7, 2026

✔️ 3c7284d - Conventional commits check succeeded.

@veeso veeso merged commit f6d65cf into main Jun 7, 2026
5 checks passed
@veeso veeso deleted the ci/fix-release-workflow branch June 7, 2026 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant