Skip to content

Release: Semantic Release#207

Merged
Ayush8923 merged 26 commits into
mainfrom
feat/semantic-release
Jun 17, 2026
Merged

Release: Semantic Release#207
Ayush8923 merged 26 commits into
mainfrom
feat/semantic-release

Conversation

@Ayush8923

@Ayush8923 Ayush8923 commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

Issue: #213

Type

type: feat

Summary

  • .releaserc.json — semantic-release config. Runs off the main branch and wires up the commit-analyzer, release-notes-generator, and GitHub plugins. Version bumps are mapped from PR type:
    • feat → minor
    • fix / chore / docs / refactor → patch
  • .github/workflows/pre-release.yml — triggered when a PR is merged into main. It extracts the PR type from the description, installs the semantic-release toolchain, generates a conventional commit, runs semantic-release to cut the version/tag and notes, and applies a released label back to the PR.
  • cd-production.ymlcreate-release.yml — also tightens the tag trigger from 'v*' to the stricter semver pattern 'v[0-9]+.[0-9]+.[0-9]+'
  • .github/PULL_REQUEST_TEMPLATE.md — restructured with Summary, issue reference, PR type (feat | fix | chore | docs | refactor), and a checklist. The PR type field is what the release workflow reads to determine the version bump.

Summary by CodeRabbit

Release Notes

  • Chores

    • Enhanced release automation infrastructure with updated GitHub workflows and semantic versioning configuration for improved version management and deployment consistency.
    • Added standardized pull request template to establish contribution documentation standards and provide reviewer guidance.
  • Other

    • Updated application identifier to reflect current staging version status.

@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2fd1fc8b-9e78-4734-b055-988aa5d9c87d

📥 Commits

Reviewing files that changed from the base of the PR and between d521c7b and e427032.

📒 Files selected for processing (6)
  • .github/PULL_REQUEST_TEMPLATE.md
  • .github/workflows/create-release.yml
  • .github/workflows/deploy-staging.yml
  • .github/workflows/pre-release.yml
  • .releaserc
  • app/lib/constants.ts

📝 Walkthrough

Walkthrough

Adds a full pre-release automation pipeline: a new .github/workflows/pre-release.yml workflow triggered on merged PRs to main, a .releaserc semantic-release config, a tightened semver tag filter on the create-release workflow, a PR template, and an APP_NAME constant update to "Kaapi Konsole Staging V1".

Changes

Release Automation Pipeline

Layer / File(s) Summary
Semantic-release config and create-release tag filter
.releaserc, .github/workflows/create-release.yml
Adds .releaserc defining main as a prerelease branch with feat→minor and fix/chore/docs/refactor→patch rules; tightens the create-release tag filter from v* to v[0-9]+.[0-9]+.[0-9]+.
Pre-release workflow trigger and job setup
.github/workflows/pre-release.yml (lines 1–27)
Defines the workflow name, closed-PR-to-main trigger, pre-release concurrency group (no cancellation), and the checkout step with full history at the PR base ref.
Commit type extraction and semantic-release execution
.github/workflows/pre-release.yml (lines 28–71)
Parses the PR description for a conventional commit type (defaulting to fix), installs semantic-release and plugins globally, creates an empty conventional commit, and runs npx semantic-release using GITHUB_TOKEN.
Prerelease notes generation and update
.github/workflows/pre-release.yml (lines 72–174)
Identifies the latest -main.<n> prerelease, determines the latest stable tag and its commit time as a cutoff, paginates merged PRs since then, bucketizes them by conventional type, builds a grouped "What's Changed" body, and updates the prerelease release notes with an optional compare link.
Stale prerelease and tag cleanup
.github/workflows/pre-release.yml (lines 175–207)
Deletes all stale -main.<n> prereleases except the newest, and attempts to delete their corresponding Git tags, logging warnings on failure.
Merged PR label management
.github/workflows/pre-release.yml (lines 208–249)
Creates two target released labels if absent, removes all existing labels from the merged PR, and applies the two released labels using the PR number from the event payload.

Repository Metadata

Layer / File(s) Summary
PR template and APP_NAME constant
.github/PULL_REQUEST_TEMPLATE.md, app/lib/constants.ts
Adds a PR template with issue, type, summary, checklist, and notes sections; changes APP_NAME exported constant to "Kaapi Konsole Staging V1".

Sequence Diagram(s)

sequenceDiagram
    participant PR as Merged PR (main)
    participant Workflow as pre-release.yml
    participant SemanticRelease as semantic-release
    participant GitHub as GitHub API

    PR->>Workflow: pull_request closed + merged
    Workflow->>Workflow: parse PR description for commit type
    Workflow->>SemanticRelease: npx semantic-release (creates v1.x.x-main.N tag)
    SemanticRelease->>GitHub: create prerelease v1.x.x-main.N

    Workflow->>GitHub: GET latest -main.N prerelease
    Workflow->>GitHub: GET merged PRs since last stable tag
    Workflow->>GitHub: PATCH prerelease notes (grouped changelog)

    Workflow->>GitHub: DELETE stale -main.N prereleases + tags
    Workflow->>GitHub: ensure released labels exist
    Workflow->>GitHub: remove all labels from merged PR
    Workflow->>GitHub: add two released labels to merged PR
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related issues

Possibly related PRs

Suggested reviewers

  • AkhileshNegi
  • vprashrex

Poem

🐇 Hop, hop, a pre-release hops along,
Semantic versions tagged with a jaunty song,
Stale prereleases swept away with care,
Labels pinned on merged PRs, oh so fair,
The rabbit cheers — automation's in the air! 🎉

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/semantic-release

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Ayush8923 Ayush8923 self-assigned this Jun 13, 2026
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 0.3.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@Ayush8923 Ayush8923 requested a review from Prajna1999 June 15, 2026 05:52
].map(c => ({ ...c, items: [] }));

const typeOf = (pr) => {
const m = (pr.body || '').match(/type:\s*(feat|fix|chore|docs|refactor)/i);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Just a suggestion: instead of writing the category title (like feat, fix, etc.) in the PR body, we could derive it from the branch name. I think that would keep the PR body cleaner and make the process a bit more streamlined.

@Ayush8923 Ayush8923 Jun 17, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for this suggestion but I considered this, but I'd prefer to keep the type explicit in the PR rather than derive it from the branch name. Since this is open source, we can't rely on contributors following a feat/, fix/ branch convention (GitHub web edits produce patch-1, and our own team often names branches module-wise like auth/... etc.). Branch names also can't carry mixed types, and they're hard to correct after push. To address the "less manual / cleaner" goal, I'd rather add a PR-description lint (conventional-commit check) so the explicit type is validated automatically.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Make Sense!

@Ayush8923 Ayush8923 merged commit 931158e into main Jun 17, 2026
1 of 2 checks passed
@Ayush8923 Ayush8923 deleted the feat/semantic-release branch June 17, 2026 04:19
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 0.2.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 0.3.0-main.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants