Skip to content

Auto-generate release notes from git log #19

Description

@ricardoleal

Problem

Both publish.yml and publish-dev.yml create releases with only the tag name as the title and an empty body. There is no changelog, no list of commits, and no summary of what changed. This makes it hard for users and testers to understand what a release contains without reading git log manually.

The releases page shows:

v1.0.1

instead of:

v1.0.1
- Fix crash when scanning empty backup list (#42)
- Update helper installation error handling (#41)

Desired Outcome

Release descriptions are auto-populated with a changelog derived from git log between the current tag and the previous tag. This should work for both stable and dev releases.

Requirements

  • Add a step before "Publish Release" / "Publish Prerelease" in both workflows that generates release notes:
    PREV_TAG=$(git tag --sort=-creatordate | head -2 | tail -1)
    git log --oneline --no-decorate "$PREV_TAG..${{ github.ref_name }}" > /tmp/release-notes.md
    Or use gh release generate-notes (available since recent GH CLI versions).
  • Write the result to a file and pass it via the body or body_path parameter of marvinpinto/action-automatic-releases@latest (check if this action supports body input — if not, migrate to softprops/action-gh-release or ncipollo/release-action which supports body_path).
  • Fall back gracefully when there is no previous tag (first release).

Context

  • marvinpinto/action-automatic-releases@latest is the current publishing action
  • git log --oneline shows concise commit history
  • GitHub's own Generate release notes button creates notes from merged PRs — consider using gh release generate-notes --repo "$GITHUB_REPOSITORY" --tag "${{ github.ref_name }}" --previous-tag "$PREV_TAG" instead of manual git log
  • GH CLI release generate-notes is available on macos-latest runners

Labels

enhancement, ci, release

Metadata

Metadata

Assignees

No one assigned

    Labels

    ciCI / build / release automationenhancementNew feature or requestreleaseRelease pipeline / packaging / distribution

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions