Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update prepare-release.yml #8135

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,34 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Validate version format
run: |
# Define the regular expression pattern for the version format.
version_pattern='^[0-9]+\.[0-9]+\.[0-9]+(-rcv?[0-9\.]+)?$'

# Check if candidate-stable matches the version pattern.
if ! [[ "${{ inputs.candidate-stable }}" =~ $version_pattern ]]; then
echo "Invalid candidate-stable version format! Expected format: x.y.z or x.y.z-rcn"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
echo "Invalid candidate-stable version format! Expected format: x.y.z or x.y.z-rcn"
echo "Invalid candidate-stable version format! Expected format: x.y.z, x.y.z-rcN or x.y.z-rcvN"

exit 1
fi

# Check if current-stable matches the version pattern.
if ! [[ "${{ inputs.current-stable }}" =~ $version_pattern ]]; then
echo "Invalid current-stable version format! Expected format: x.y.z or x.y.z-rcn"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
echo "Invalid current-stable version format! Expected format: x.y.z or x.y.z-rcn"
echo "Invalid current-stable version format! Expected format: x.y.z, x.y.z-rcN or x.y.z-rcvN"

exit 1
fi

# Check if candidate-beta matches the version pattern.
if ! [[ "${{ inputs.candidate-beta }}" =~ $version_pattern ]]; then
echo "Invalid candidate-beta version format! Expected format: x.y.z or x.y.z-rcn"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
echo "Invalid candidate-beta version format! Expected format: x.y.z or x.y.z-rcn"
echo "Invalid candidate-beta version format! Expected format: x.y.z, x.y.z-rcN or x.y.z-rcvN

exit 1
fi

# Check if current-beta matches the version pattern.
if ! [[ "${{ inputs.current-beta }}" =~ $version_pattern ]]; then
echo "Invalid current-beta version format! Expected format: x.y.z or x.y.z-rcn"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
echo "Invalid current-beta version format! Expected format: x.y.z or x.y.z-rcn"
echo "Invalid current-beta version format! Expected format: x.y.z, x.y.z-rcN or x.y.z-rcvN

exit 1
fi
# Make sure that there are no open issues with release:blocker label in Core. The release has to be delayed until they are resolved.
- name: Check blockers in core
env:
Expand Down