Skip to content
Merged
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
11 changes: 9 additions & 2 deletions .github/workflows/release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,14 @@ jobs:

# Use custom version if provided
if [ -n "${{ inputs.custom_version }}" ]; then
NEW_VERSION="${{ inputs.custom_version }}"
CUSTOM="${{ inputs.custom_version }}"
# Strip optional 'v' prefix and validate strict semver (X.Y.Z)
CUSTOM="${CUSTOM#v}"
if [[ ! "$CUSTOM" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "::error::Invalid custom version '${{ inputs.custom_version }}'. Must be semver (e.g., 1.2.3 or v1.2.3)."
exit 1
fi
NEW_VERSION="$CUSTOM"
else
# Determine bump type
if [ "${{ inputs.version_type }}" == "auto" ]; then
Expand Down Expand Up @@ -158,7 +165,7 @@ jobs:
fi

# Other changes (refactor, perf, style, or non-conventional commits)
OTHERS=$(echo "$COMMITS" | grep -ivE "^(feat|fix|chore|ci|docs|test)(\(.+\))?:" | head -10 | sed 's/^/- /' || true)
OTHERS=$(echo "$COMMITS" | grep -ivE "^(feat|fix|chore|ci|docs|test)(\(.+\))?:" | sed 's/^/- /' || true)
if [ -n "$OTHERS" ]; then
ENTRY+="### Changed"$'\n'"$OTHERS"$'\n\n'
fi
Expand Down