Skip to content

chore(release): 🔧 update release workflow for versioning and prerelease#23

Merged
baxyz merged 1 commit into
mainfrom
fix-release
Apr 4, 2026
Merged

chore(release): 🔧 update release workflow for versioning and prerelease#23
baxyz merged 1 commit into
mainfrom
fix-release

Conversation

@baxyz

@baxyz baxyz commented Apr 4, 2026

Copy link
Copy Markdown
Contributor
  • rename version_type to release_type with new description
  • add prerelease options for alpha, beta, and rc
  • adjust version bump logic to handle prerelease identifiers

Description

Please include a summary of what this PR does and why it's needed.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring
  • Test improvement

Related Issues

Closes #(issue number)

How Has This Been Tested?

Describe the tests you ran and how to reproduce them:

  • Test A
  • Test B

Checklist

  • My code follows the code style of this project
  • I have updated the documentation accordingly
  • I have added tests for my changes
  • All new and existing tests passed locally
  • My commits follow the conventional commit format

Screenshots (if applicable)

Add screenshots for UI changes.

Additional Context

Add any other context about the PR here.

- rename version_type to release_type with new description
- add prerelease options for alpha, beta, and rc
- adjust version bump logic to handle prerelease identifiers
Copilot AI review requested due to automatic review settings April 4, 2026 21:28
@baxyz baxyz merged commit 12a5f46 into main Apr 4, 2026
15 checks passed
@baxyz baxyz deleted the fix-release branch April 4, 2026 21:30

Copilot AI left a comment

Copy link
Copy Markdown

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 updates the release automation to support prerelease variants (alpha/beta/rc) and adjusts the versioning script and GitHub Actions workflow to propagate the computed version/tag through the pipeline.

Changes:

  • Extend version-manager.ts to accept a --prerelease-id (alpha/beta/rc) and pass it into prerelease bump logic.
  • Update release.yml workflow inputs (version_typerelease_type) and derive the npm dist-tag from the resulting version.
  • Expose bumped version/tag/prerelease status as job outputs and use them during publish and GitHub Release creation.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
scripts/version/version-manager.ts Adds prerelease identifier support and wires it into version bumping/CLI parsing.
.github/workflows/release.yml Updates manual dispatch inputs and release steps to bump versions for alpha/beta/rc and publish with derived npm tags.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

components.prerelease.version++;
}
} else {
// Add new prerelease

Copilot AI Apr 4, 2026

Copy link

Choose a reason for hiding this comment

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

In the prerelease bump path, when the current version is stable (no existing components.prerelease), the code only adds a prerelease suffix without incrementing the patch version. That yields 1.0.0 -> 1.0.0-alpha.0, which contradicts the help text in this file (and typical SemVer flow) that expects 1.0.0 -> 1.0.1-alpha.0. Consider incrementing components.patch before setting components.prerelease when starting a new prerelease from a stable version.

Suggested change
// Add new prerelease
// Start a prerelease for the next patch version
components.patch++;

Copilot uses AI. Check for mistakes.
;;
auto)
pnpm version:auto
;;

Copilot AI Apr 4, 2026

Copy link

Choose a reason for hiding this comment

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

This case statement has no default (*) branch. If inputs.release_type is ever an unexpected value (e.g., future option added, or a manual workflow_dispatch payload), the bump will be skipped silently and the workflow will proceed using the old version. Add a default branch that prints an error and exits non-zero before esac.

Suggested change
;;
;;
*)
echo "❌ Unsupported release_type: $RELEASE_TYPE" >&2
exit 1
;;

Copilot uses AI. Check for mistakes.
Comment on lines +6 to 8
release_type:
description: "Release type (alpha/beta/rc are prerelease variants)"
required: true

Copilot AI Apr 4, 2026

Copy link

Choose a reason for hiding this comment

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

The workflow inputs were renamed/repurposed (version_typerelease_type, and prerelease options changed), but .github/workflows/README.md still documents the old version_type input. To avoid confusing maintainers, update the workflow documentation to match the new inputs and options.

Copilot uses AI. Check for mistakes.
Comment on lines +304 to +308
case '--prerelease-id': {
const id = args[++i];
if (id !== 'alpha' && id !== 'beta' && id !== 'rc') {
console.error(`Invalid prerelease id: ${id} (expected alpha, beta, or rc)`);
process.exit(1);

Copilot AI Apr 4, 2026

Copy link

Choose a reason for hiding this comment

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

--prerelease-id is accepted regardless of the chosen versionType. If a caller passes --prerelease-id with patch/minor/major (or with --auto resulting in non-prerelease), it will be silently ignored. Consider validating that --prerelease-id is only allowed when the resolved version type is prerelease (or failing fast when incompatible) to prevent confusing CLI usage.

Copilot uses AI. Check for mistakes.
@github-actions

github-actions Bot commented Apr 4, 2026

Copy link
Copy Markdown
Contributor

✅ PR Validation Passed

All checks passed and coverage target reached!


📋 Pipeline Status

Job Status
🔢 Version passing
🏗️ Build passing
🧪 Tests passing
📝 Lint passing
📘 TypeCheck passing
🔐 Security Audit passing
🧾 Conventional Commits passing
🔗 Coherency passing

📊 Code Coverage

Overall Coverage: 100.0% — Target reached! 🎯

Metric Progress Coverage
Lines ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100%
Branches ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100%
Functions ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100%
Statements ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100%

🧬 Mutation Testing

🟡 Mutation Score: 88.44% — good

Metric Progress Score
🟡 Mutation Score ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░ 88.44%

🧬 Mutation testing is informational only and does not block the PR


ℹ️ About this report
  • 🎯 Coverage Target: 100% for all metrics
  • 🧬 Mutation Testing: powered by Stryker (non-blocking)
  • 🔄 This comment updates automatically with each push
  • 📈 Coverage is measured using Vitest + v8

🤖 Generated by @helpers4 CI • 2026-04-04

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.

2 participants