Skip to content

refactor(publish): inline git-cliff release notes (drop changelog-update workflow)#3

Merged
jan-kubica merged 2 commits into
mainfrom
feat/inline-git-cliff-release-notes
Jun 2, 2026
Merged

refactor(publish): inline git-cliff release notes (drop changelog-update workflow)#3
jan-kubica merged 2 commits into
mainfrom
feat/inline-git-cliff-release-notes

Conversation

@jan-kubica
Copy link
Copy Markdown
Contributor

@jan-kubica jan-kubica commented Jun 1, 2026

Summary

PR #2's chained update-changelog job (reusable workflow at stella/.github/.github/workflows/changelog-update.yml) failed at the peter-evans/create-pull-request step on run 26757624350: the org-wide setting can_approve_pull_request_reviews is disabled and the default GITHUB_TOKEN is not allowed to create PRs. The reusable workflow has not actually produced output on any stella repo (zero chore/changelog-update PRs exist across the org), so the pattern is non-functional in practice.

Switch tooling to the inline pattern already used by stella/stella's release.yml: run git-cliff inside the publish workflow, write NOTES.md, and pass --notes-file NOTES.md to gh release create. No second PR, no org toggle, no PR-creation permission needed.

Changes

  • Add cliff.toml (copied from stella/stella, with the PR-link postprocessor rewritten to point at stella/tooling).
  • Drop the update-changelog job and the tag / version outputs it consumed.
  • Add fetch-depth: 0 to the checkout (git-cliff needs full history).
  • Compute the changelog range from the most recent existing stable tag, excluding the release tag, up to HEAD; fall back to the first commit on a fresh repo.
  • Generate NOTES.md with orhun/git-cliff-action@v4.8.0 and pass it to gh release create --notes-file.
  • Keep reruns predictable: an existing tag must already point at HEAD, and an existing GitHub release gets refreshed notes plus clobbered assets.

Follow-up (not in this PR)

The existing v0.3.0 release has an empty body. After this lands it can be backfilled manually with:

first_commit="$(git rev-list --max-parents=0 v0.3.0 | tail -n 1)"
bunx git-cliff --config cliff.toml --tag v0.3.0 --strip header "${first_commit}..v0.3.0" > NOTES.md
gh release edit v0.3.0 --notes-file NOTES.md

The next VERSION bump will produce a Conventional Commits changelog automatically.

Test plan

  • bun install --frozen-lockfile clean
  • bun run typecheck clean
  • bun run lint clean
  • bun run publint clean
  • bun run pack:dry-run produces both tarballs
  • bun test clean
  • bunx --bun @taplo/cli check cliff.toml clean
  • bunx --bun git-cliff --config cliff.toml --tag v0.4.0 --strip header v0.3.0..HEAD produces sectioned notes with stella/tooling PR links
  • Shell smoke covers the no-previous-stable-tag range fallback
  • Shell smoke covers existing-tag-at-HEAD and existing-tag-at-other-commit behavior
  • After merge, the next VERSION bump publishes a release whose body contains the Conventional Commits changelog

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a cliff.toml configuration file for git-cliff to generate release notes from Conventional Commits. The reviewer identified three key areas for improvement: correcting the newline escape sequence in the commit message split pattern to prevent rendering issues, expanding the dependency pattern to capture scopes like deps-dev, and skipping release-related commits to keep the changelog clean.

Comment thread cliff.toml Outdated
Comment thread cliff.toml Outdated
Comment thread cliff.toml
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 96ae692fac

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/publish.yml Outdated
…ate workflow)

PR #2's chained `update-changelog` job (reusable
`stella/.github/.github/workflows/changelog-update.yml`) failed at
`peter-evans/create-pull-request` because the org-wide setting
`can_approve_pull_request_reviews` is disabled and the default
`GITHUB_TOKEN` is not allowed to create PRs. The reusable workflow
has, in fact, never produced output on any stella repo.

Replace the second-PR pattern with `stella/stella`'s working
approach: run git-cliff inline in the publish workflow, write
`NOTES.md`, and pass `--notes-file NOTES.md` to `gh release create`.

- Add `cliff.toml` (copied from stella/stella, with the PR-link
  postprocessor rewritten to point at stella/tooling).
- Drop the `update-changelog` job and the `tag`/`version` outputs
  it consumed.
- Add `fetch-depth: 0` to the checkout (git-cliff needs full
  history).
- Compute the changelog range from the most recent existing stable
  tag up to HEAD, then feed the args to git-cliff.
- Pass the generated `NOTES.md` to `gh release create`.

No second PR, no toggle needed, no PR-creation permission needed.
@jan-kubica jan-kubica force-pushed the feat/inline-git-cliff-release-notes branch from 96ae692 to c85d508 Compare June 2, 2026 20:35
@jan-kubica
Copy link
Copy Markdown
Contributor Author

@codex review

CC on behalf of @jan-kubica

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@jan-kubica jan-kubica merged commit e7db396 into main Jun 2, 2026
2 checks passed
@jan-kubica jan-kubica deleted the feat/inline-git-cliff-release-notes branch June 2, 2026 20:43
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