feat(workflows): reusable changelog-update workflow#33
Conversation
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.
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
There was a problem hiding this comment.
💡 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".
| 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 }} |
There was a problem hiding this comment.
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 👍 / 👎.
Adds
.github/workflows/changelog-update.yml, aworkflow_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-configis the built-inkeepachangelogpreset, so consumers don't need acliff.tomlto opt in. Consumers can passcliff-config: cliff.tomlto 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
Test plan