fix: normalize version input by stripping leading 'v' or 'V' prefix in release workflow#337
Merged
fix: normalize version input by stripping leading 'v' or 'V' prefix in release workflow#337
Conversation
…n release workflow
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves version handling in the release workflow by introducing normalization of version inputs. The workflow now strips any leading 'v' or 'V' prefix from the version input and uses the normalized version consistently throughout all steps, reducing code redundancy and potential errors.
Changes:
- Added version normalization logic that strips leading 'v' or 'V' characters and exports the normalized version as a GITHUB_ENV variable
- Replaced all direct references to
github.event.inputs.versionwith the normalized$VERSIONenvironment variable across all workflow steps - Cleaned up trailing whitespace throughout the workflow file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request improves the version handling logic in the
.github/workflows/release-workflow.ymlfile. The main change is the normalization of the version input by stripping any leading 'v' or 'V' characters, ensuring consistent semantic versioning throughout the workflow. The normalized version is then used in all subsequent steps, reducing redundancy and potential errors.Version normalization and usage improvements:
VERSIONenvironment variable instead of referencinggithub.event.inputs.versiondirectly, ensuring consistency across version updates inpackage.json,version.txt,pyproject.toml, markdown files, commit messages, release tags, and summary steps. [1] [2] [3] [4] [5] [6] [7]