Skip to content

Release workflow writes "Initial release" instead of the changelog/compare link #127

Closed

Description

@CameronBrooks11

What

Every GitHub Release cut by release.yml shows "Initial release." in its Changelog section instead of the changelog diff / vPrev...vNew compare link that GitHub normally produces. 8 releases are affected: v0.5.2, v0.5.3, v0.5.4, v0.6.1, v0.6.2, v0.7.0, v0.7.1, v0.7.2. (Older ones — v0.6.0, v0.5.1, v0.5.0, v0.4.0, v0.3.0 — predate this logic and are unaffected.)

Root cause

In .github/workflows/release.yml, the create-release job checkout does not fetch tags:

  • create-release → actions/checkout@v7 (L112) has no fetch-depth: 0 — contrast the validate job (L28-30) which does.
  • "Get previous tag" (L124): PREV_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo ""). On a shallow, tagless checkout git describe fails and PREV_TAG becomes empty.
  • "Generate release notes" github-script: if (prevTag) { …categorized changes + Full Changelog compare link… } else { notes += "Initial release.\n" } (L171 / L209 / L211). With prevTag empty it always takes the else.

So the compare/changelog path at L171-209 is dead on every run.

Remediation plan

Part A — Fix the workflow (prevent recurrence)

Recommended (minimal + native): stop hand-rolling the changelog. Drop the "Get previous tag" + custom github-script "Generate release notes" steps and let softprops/action-gh-release generate native notes:

  • On the release step set generate_release_notes: true and keep body: with the Desktop Installers / Python Package / PyPI sections (the action appends the generated ## What's Changed + **Full Changelog**: vPrev...vNew).
  • This is what GitHub "normally does", removes ~80 lines of custom script, and sidesteps the tag-fetch bug entirely (notes are generated server-side; no local git describe).

Alternative (one-line): keep the custom script but add fetch-depth: 0 to the create-release checkout so git describe --tags resolves the previous tag. Less code removed; keeps the commit-prefix categorization.

Part B — Retroactively fix the 8 affected release bodies (gh CLI)

For each affected tag, regenerate the changelog via the native endpoint and splice it into the existing body (preserving the Installers / Python / PyPI sections):

gh api repos/CameronBrooks11/fiberpath/releases/generate-notes \
  -f tag_name=vX.Y.Z -f previous_tag_name=vPrev → .body  (## What's Changed + Full Changelog: vPrev...vX.Y.Z)
gh release edit vX.Y.Z --notes "<body with the 'Initial release.' block replaced>"

Previous-tag pairs: 0.5.2←0.5.1, 0.5.3←0.5.2, 0.5.4←0.5.3, 0.6.1←0.6.0, 0.6.2←0.6.1, 0.7.0←0.6.2, 0.7.1←0.7.0, 0.7.2←0.7.1.

Acceptance criteria

  • create-release no longer depends on a tagless checkout; the next release shows a proper ## What's Changed + Full Changelog: vPrev...vNew, not "Initial release."
  • All 8 affected release bodies are corrected (changelog/compare link present; Installers/Python/PyPI sections preserved).
  • Workflow change keeps SBOM/PyPI/installer behavior intact.

Where

  • .github/workflows/release.yml: create-release checkout (L112), "Get previous tag" (L120-125), "Generate release notes" github-script (L135-215, else at L211), release step (L228-241).

Activity

  1. added
    ci
    on Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ci

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions