Skip to content

feat: add support for prereleases#6

Merged
MichaMican merged 11 commits into
mainfrom
feat/add-support-for-prereleases
Nov 5, 2025
Merged

feat: add support for prereleases#6
MichaMican merged 11 commits into
mainfrom
feat/add-support-for-prereleases

Conversation

@MichaMican

@MichaMican MichaMican commented Nov 4, 2025

Copy link
Copy Markdown
Collaborator

closes #2

This pull request adds support for prerelease versioning to the semantic versioning GitHub Actions workflows. It introduces new workflow inputs for prerelease handling, updates the version calculation logic to distinguish between stable and prerelease tags, and ensures that release notes are generated from the correct base tag for both stable and prerelease releases.

Prerelease versioning support:

  • Added is_prerelease and prerelease_name inputs to .github/workflows/semver-version.yml to allow generating prerelease versions (e.g., 1.2.3-rc.1) and specifying a custom prerelease identifier.
  • Updated the version calculation logic to find both the last stable and last prerelease tags, increment the prerelease version appropriately, and build the correct version string for both stable and prerelease releases. [1] [2]

Release workflow improvements:

  • Passed the new is_prerelease input to the release workflow and used it to conditionally add the --prerelease flag to the gh release create command. [1] [2] [3] [4]
  • Ensured that release notes are generated starting from the correct base tag (previous_tag_for_changelog), whether releasing a stable or prerelease version. [1] [2] [3]

Version calculation and changelog generation:

  • The workflow now outputs both the previous stable tag and the previous tag used for changelog generation, improving accuracy for release notes in both stable and prerelease scenarios. [1] [2]

These changes make the release process more flexible and robust, supporting both stable and prerelease workflows.

@MichaMican
MichaMican requested a review from Copilot November 4, 2025 14:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 adds comprehensive support for prerelease versioning to the semantic versioning GitHub Actions workflows. It enables generating prerelease versions (e.g., 1.2.3-rc.1) with custom identifiers and ensures proper release note generation for both stable and prerelease workflows.

Key changes include:

  • Added is_prerelease and prerelease_name workflow inputs for prerelease configuration
  • Enhanced version calculation logic to handle both stable and prerelease tag detection and incrementing
  • Improved release workflow to conditionally create prereleases and generate accurate changelogs

Reviewed Changes

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

File Description
.github/workflows/semver-version.yml Major enhancement adding prerelease inputs, sophisticated tag parsing logic, and conditional release creation
.github/workflows/release-semver-version.yml Simple addition of prerelease input parameter passthrough

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

Comment thread .github/workflows/semver-version.yml Outdated
Comment thread .github/workflows/semver-version.yml Outdated

Copilot AI commented Nov 4, 2025

Copy link
Copy Markdown
Contributor

@MichaMican I've opened a new pull request, #7, to work on those changes. Once the pull request is ready, I'll request review from you.

@hoetz
hoetz requested a review from a-mnich November 4, 2025 14:30
Co-authored-by: MichaMican <45571948+MichaMican@users.noreply.github.com>
Comment thread .github/workflows/semver-version.yml
@a-mnich

a-mnich commented Nov 4, 2025

Copy link
Copy Markdown
Contributor

@copilot adapt the readme to include the new inputs

Copilot AI commented Nov 4, 2025

Copy link
Copy Markdown
Contributor

@a-mnich I've opened a new pull request, #8, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 3 commits November 4, 2025 17:28
Co-authored-by: a-mnich <56564725+a-mnich@users.noreply.github.com>
Escape regex metacharacters in prerelease_name before pattern matching
docs: document prerelease workflow inputs
a-mnich
a-mnich previously approved these changes Nov 5, 2025
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
a-mnich
a-mnich previously approved these changes Nov 5, 2025
@MichaMican
MichaMican requested a review from Copilot November 5, 2025 08:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 3 out of 3 changed files in this pull request and generated 4 comments.


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

Comment thread .github/workflows/release-semver-version.yml
Comment thread .github/workflows/semver-version.yml
Comment thread .github/workflows/semver-version.yml
Comment thread .github/workflows/semver-version.yml Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

@MWilheEx MWilheEx left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

PikachuGIF

@MichaMican
MichaMican merged commit 21cc846 into main Nov 5, 2025
2 of 3 checks passed
@MichaMican
MichaMican deleted the feat/add-support-for-prereleases branch November 5, 2025 12:21
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.

add prerelease flag support

5 participants