Skip to content

feat: merge release workflows into one#27

Merged
aritra1999 merged 1 commit intomainfrom
feature/unify-release-pipeline
Feb 26, 2026
Merged

feat: merge release workflows into one#27
aritra1999 merged 1 commit intomainfrom
feature/unify-release-pipeline

Conversation

@aritra1999
Copy link
Copy Markdown
Owner

@aritra1999 aritra1999 commented Feb 26, 2026

Unify the release pipeline to make the deployment experience of new versions smoother.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 26, 2026

📝 Walkthrough

Walkthrough

This PR consolidates the standalone auto-release workflow into the main release workflow. The auto-release.yml file is removed entirely, and release.yml is restructured to include a new "version" job that computes release versions from conventional commits or manual input, with subsequent build and release jobs consuming this computed version.

Changes

Cohort / File(s) Summary
Workflow Consolidation
.github/workflows/auto-release.yml, .github/workflows/release.yml
Removed auto-release.yml entirely and refactored release.yml to incorporate version computation logic. Added a new "version" job that calculates releases from conventional commits or manual input, with Build and Release jobs now depending on and consuming the computed new_version output.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • #2: Directly overlaps—removes auto-release.yml and consolidates its versioning logic into the release workflow structure
  • #8: Modifies the release workflow to compute and manage release versions from Git commits and tags
  • #11: Replaces static VERSION file reading with commit-based version computation and tag creation in release workflows
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: merge release workflows into one' directly and clearly describes the main change: consolidating the auto-release.yml and release.yml workflows into a unified release pipeline.
Description check ✅ Passed The description 'Unify the release pipeline to make the deployment experience of new versions smoother' is related to the changeset, which refactors the release workflows to improve the deployment process.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/unify-release-pipeline

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.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (3)
.github/workflows/release.yml (3)

236-236: Consider pinning third-party action to a commit SHA.

Using @v1 allows the action maintainer to update the underlying code. For better supply chain security, consider pinning to a specific commit SHA.

🔒 Example with SHA pinning
      - name: Create Release
-       uses: softprops/action-gh-release@v1
+       uses: softprops/action-gh-release@c95fe1c1b20623045f0b29127a5ef0c864a2112d  # v1

You can find the latest SHA for the v1 tag by checking the action's releases page.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/release.yml at line 236, Replace the floating tag usage of
the GitHub Action "softprops/action-gh-release@v1" with a pinned commit SHA to
improve supply-chain security: locate the workflow step that uses "uses:
softprops/action-gh-release@v1", find the corresponding v1 tag's commit SHA on
the action's GitHub releases/tags page, and update the line to "uses:
softprops/action-gh-release@<COMMIT_SHA>" (keeping the same step configuration)
so the action is locked to a specific immutable revision.

35-41: Validate manual version input format.

The manual version input is used directly without validation. While exploitability is limited (requires workflow dispatch permissions), it's good practice to validate the input matches expected semver format.

🛡️ Suggested input validation
          if [ -n "${{ github.event.inputs.version }}" ]; then
            NEW_VERSION="${{ github.event.inputs.version }}"
+           # Validate version format (vX.Y.Z)
+           if ! echo "$NEW_VERSION" | grep -qE '^v[0-9]+\.[0-9]+\.[0-9]+$'; then
+             echo "Error: Invalid version format. Expected vX.Y.Z (e.g., v1.2.3)"
+             exit 1
+           fi
            echo "Using manual version: $NEW_VERSION"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/release.yml around lines 35 - 41, Validate the manual
version input (github.event.inputs.version) before assigning NEW_VERSION: check
it against a semver regex (e.g., major.minor.patch with optional
pre-release/build) and if it does not match, write an error to stdout/stderr and
exit non-zero instead of proceeding; update the conditional around NEW_VERSION
assignment (the block that sets NEW_VERSION, emits new_version to GITHUB_OUTPUT
and should_release) to perform this validation and only emit outputs when the
input passes the semver check.

86-90: Handle missing version components gracefully.

If a tag doesn't follow strict semver (e.g., v1.0 instead of v1.0.0), the cut commands will return empty strings for missing components, potentially causing arithmetic errors.

🔧 Suggested fix for version parsing
          # Parse current version (remove 'v' prefix)
          VERSION=${LATEST_TAG#v}
-         MAJOR=$(echo $VERSION | cut -d. -f1)
-         MINOR=$(echo $VERSION | cut -d. -f2)
-         PATCH=$(echo $VERSION | cut -d. -f3)
+         MAJOR=$(echo $VERSION | cut -d. -f1)
+         MINOR=$(echo $VERSION | cut -d. -f2)
+         PATCH=$(echo $VERSION | cut -d. -f3)
+         # Default to 0 if components are missing
+         MAJOR=${MAJOR:-0}
+         MINOR=${MINOR:-0}
+         PATCH=${PATCH:-0}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/release.yml around lines 86 - 90, VERSION parsing can fail
for non-3-part tags (e.g. v1.0) leaving MAJOR/MINOR/PATCH empty; when extracting
parts from LATEST_TAG (VERSION=${LATEST_TAG#v}) ensure you split into fields
robustly and provide numeric defaults (0) for missing parts so arithmetic won't
error. Update the parsing that sets MAJOR, MINOR, PATCH to safely split VERSION
(using IFS/read or awk) and then coerce each part to a fallback like
${MAJOR:-0}, ${MINOR:-0}, ${PATCH:-0} (or equivalent) so missing components are
treated as 0; keep LATEST_TAG and VERSION logic intact and only change the
extraction/assignment for MAJOR, MINOR, PATCH.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.github/workflows/release.yml:
- Line 236: Replace the floating tag usage of the GitHub Action
"softprops/action-gh-release@v1" with a pinned commit SHA to improve
supply-chain security: locate the workflow step that uses "uses:
softprops/action-gh-release@v1", find the corresponding v1 tag's commit SHA on
the action's GitHub releases/tags page, and update the line to "uses:
softprops/action-gh-release@<COMMIT_SHA>" (keeping the same step configuration)
so the action is locked to a specific immutable revision.
- Around line 35-41: Validate the manual version input
(github.event.inputs.version) before assigning NEW_VERSION: check it against a
semver regex (e.g., major.minor.patch with optional pre-release/build) and if it
does not match, write an error to stdout/stderr and exit non-zero instead of
proceeding; update the conditional around NEW_VERSION assignment (the block that
sets NEW_VERSION, emits new_version to GITHUB_OUTPUT and should_release) to
perform this validation and only emit outputs when the input passes the semver
check.
- Around line 86-90: VERSION parsing can fail for non-3-part tags (e.g. v1.0)
leaving MAJOR/MINOR/PATCH empty; when extracting parts from LATEST_TAG
(VERSION=${LATEST_TAG#v}) ensure you split into fields robustly and provide
numeric defaults (0) for missing parts so arithmetic won't error. Update the
parsing that sets MAJOR, MINOR, PATCH to safely split VERSION (using IFS/read or
awk) and then coerce each part to a fallback like ${MAJOR:-0}, ${MINOR:-0},
${PATCH:-0} (or equivalent) so missing components are treated as 0; keep
LATEST_TAG and VERSION logic intact and only change the extraction/assignment
for MAJOR, MINOR, PATCH.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f18d4c2 and 14451b9.

📒 Files selected for processing (2)
  • .github/workflows/auto-release.yml
  • .github/workflows/release.yml
💤 Files with no reviewable changes (1)
  • .github/workflows/auto-release.yml

@aritra1999 aritra1999 merged commit d613a99 into main Feb 26, 2026
3 checks passed
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