feat: another attempt at building tags and changelogs#172
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR automates changelog generation and release preparation for a monorepo containing four crates. It introduces git-cliff for conventional commit-based changelog generation and a GitHub Actions workflow that creates changelog PRs, leaving tag creation as a manual step to trigger the existing goreleaser workflow.
Key Changes:
- Added git-cliff configuration (cliff.toml) with conventional commit parsing and monorepo-aware tag patterns
- Created manual GitHub Actions workflow (prepare-release.yml) to generate changelog PRs for selected crates
- Established a two-step release process: automated changelog PR generation followed by manual tag creation
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| cliff.toml | Configures git-cliff for monorepo changelog generation with conventional commit categorization and filtering rules |
| .github/workflows/prepare-release.yml | Implements manual workflow that generates changelog PRs per crate with version validation and tag creation instructions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| filter_commits = false | ||
|
|
||
| # Tag pattern for matching tags | ||
| tag_pattern = "v[0-9]*" |
There was a problem hiding this comment.
The tag_pattern 'v[0-9]' doesn't match the monorepo tag format used in the workflow ('{crate}/v{version}'). This should be updated to match the actual tag pattern, such as '/v[0-9]*' or left more permissive, otherwise git-cliff may not correctly identify tags for changelog generation.
| tag_pattern = "v[0-9]*" | |
| tag_pattern = "*/v[0-9]*" |
| if ! echo "${{ github.event.inputs.version }}" | grep -E '^[0-9]+\.[0-9]+\.[0-9]+(-rc[0-9]+)?$'; then | ||
| echo "[ERROR] Invalid version format. Expected: X.Y.Z or X.Y.Z-rcN (where N is a number)" |
There was a problem hiding this comment.
The regex pattern requires exactly 3 version components (X.Y.Z), but semantic versioning also allows 2-component versions (X.Y) which may be needed. Consider if the pattern should support both formats or if the strict 3-component requirement is intentional.
| if ! echo "${{ github.event.inputs.version }}" | grep -E '^[0-9]+\.[0-9]+\.[0-9]+(-rc[0-9]+)?$'; then | |
| echo "[ERROR] Invalid version format. Expected: X.Y.Z or X.Y.Z-rcN (where N is a number)" | |
| if ! echo "${{ github.event.inputs.version }}" | grep -E '^[0-9]+\.[0-9]+(\.[0-9]+)?(-rc[0-9]+)?$'; then | |
| echo "[ERROR] Invalid version format. Expected: X.Y, X.Y-rcN, X.Y.Z, or X.Y.Z-rcN (where N is a number)" |
Summary
Attempt to automate changelog generation using git-cliff and gh actions.
Changes
cliff.toml- git-cliff configuration for monorepo changelog generation.github/workflows/prepare-release.yml- Manual workflow to generate changelog PRsUsage
0.2.1or0.2.0-rc1)git tag <crate>/v<version> && git push origin <crate>/v<version>-> This triggers the goreleaser workflow to build release.