Skip to content

feat(workflows): reusable changelog-update workflow#33

Merged
jan-kubica merged 1 commit into
mainfrom
feat/changelog-update
May 21, 2026
Merged

feat(workflows): reusable changelog-update workflow#33
jan-kubica merged 1 commit into
mainfrom
feat/changelog-update

Conversation

@jan-kubica
Copy link
Copy Markdown
Contributor

Adds .github/workflows/changelog-update.yml, a workflow_call-only reusable workflow that consumers wire into their release pipeline. After a release tag is created and packages are published, the workflow runs git-cliff against full git history and opens (or updates) a PR with the regenerated CHANGELOG.md.

Default cliff-config is the built-in keepachangelog preset, so consumers don't need a cliff.toml to opt in. Consumers can pass cliff-config: cliff.toml to use a repo-local config (e.g., anonymize's existing release-notes config can be reused or a separate file added).

Closes the org-wide CHANGELOG-drift problem (every PR landed today touched stale entries) by single-sourcing the file from Conventional Commits.

Consumer wiring

# in each repo's .github/workflows/release.yml
update-changelog:
  needs: publish
  uses: stella/.github/.github/workflows/changelog-update.yml@<pinned-sha>
  with:
    tag: ${{ inputs.tag }}

Test plan

  • actionlint clean (verified locally)
  • Pin SHA after merge and roll out to the 6 @stll repos (separate PRs)
  • First release on a consumer repo opens a CHANGELOG PR end-to-end

Adds a reusable workflow that consumers can call from their release
pipeline after a tag is created. It generates a fresh CHANGELOG.md
from Conventional Commits via git-cliff (default preset:
keepachangelog; consumers can override with a path to their own
cliff.toml), then opens or updates a PR with the diff.

Mirrors the existing provenance-update.yml pattern (App-token mint,
peter-evans/create-pull-request, idempotent branch).

Consumers wire in by adding a `needs: publish` job to their
release.yml that calls this workflow with the release tag.
@gemini-code-assist
Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@jan-kubica jan-kubica marked this pull request as ready for review May 21, 2026 11:58
@jan-kubica jan-kubica requested a review from nnad3N as a code owner May 21, 2026 11:58
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: 37d6b313de

ℹ️ 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 on lines +127 to +130
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
with:
token: ${{ secrets.auth_token || steps.app-token.outputs.token || github.token }}
branch: ${{ inputs.branch }}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Specify base branch for create-pull-request

This reusable workflow is meant to run after a release tag is cut, but create-pull-request is invoked without a base input. Per the action’s own guidance, release-triggered checkouts are detached HEAD/tag checkouts and must set base explicitly; otherwise PR creation can fail or target an unintended base branch depending on caller context. In release/tag-driven consumers, this makes changelog PR creation unreliable.

Useful? React with 👍 / 👎.

@jan-kubica jan-kubica merged commit d11bdc9 into main May 21, 2026
2 checks passed
@jan-kubica jan-kubica deleted the feat/changelog-update branch May 21, 2026 12:15
@github-actions github-actions Bot locked and limited conversation to collaborators May 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant