Skip to content

Comments

feat: another attempt at building tags and changelogs#172

Open
vihu wants to merge 4 commits intomainfrom
rg/release-prep
Open

feat: another attempt at building tags and changelogs#172
vihu wants to merge 4 commits intomainfrom
rg/release-prep

Conversation

@vihu
Copy link
Collaborator

@vihu vihu commented Oct 23, 2025

Summary

Attempt to automate changelog generation using git-cliff and gh actions.

Changes

  • Add cliff.toml - git-cliff configuration for monorepo changelog generation
  • Add .github/workflows/prepare-release.yml - Manual workflow to generate changelog PRs

Usage

  1. Go to Actions -> "Prepare Release" -> Run workflow
  2. Select crate (sentinel, contributor-rewards, doublezero-solana, or solana-validator-debt)
  3. Enter version (e.g., 0.2.1 or 0.2.0-rc1)
  4. Review and merge the generated changelog PR
  5. Create tag MANUALLY: git tag <crate>/v<version> && git push origin <crate>/v<version> -> This triggers the goreleaser workflow to build release.

@vihu vihu requested a review from Copilot October 23, 2025 16:40
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

@vihu vihu requested a review from Copilot October 23, 2025 17:06
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

@vihu vihu requested a review from Copilot October 23, 2025 17:13
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

@vihu vihu requested a review from Copilot October 23, 2025 17:16
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

@vihu vihu requested a review from Copilot October 23, 2025 18:05
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

@vihu vihu requested a review from Copilot October 23, 2025 18:14
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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]*"
Copy link

Copilot AI Oct 23, 2025

Choose a reason for hiding this comment

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

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.

Suggested change
tag_pattern = "v[0-9]*"
tag_pattern = "*/v[0-9]*"

Copilot uses AI. Check for mistakes.
Comment on lines +30 to +31
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)"
Copy link

Copilot AI Oct 23, 2025

Choose a reason for hiding this comment

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

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.

Suggested change
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)"

Copilot uses AI. Check for mistakes.
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