File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 9898 run : |
9999 if [ '${{ github.event_name }}' == 'pull_request' ]; then
100100 if [ ${{ github.event.pull_request.merged }} == true ]; then
101- echo "version=${{ github.event.pull_request.title }}" >> $GITHUB_OUTPUT
101+ # Extract version from PR title (handles "Release X.Y.Z", "vX.Y.Z", or "X.Y.Z")
102+ PR_TITLE="${{ github.event.pull_request.title }}"
103+ VERSION=$(echo "$PR_TITLE" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.]+)?' | head -1)
104+ if [ -n "$VERSION" ]; then
105+ echo "version=$VERSION" >> $GITHUB_OUTPUT
106+ else
107+ echo "version=$PR_TITLE" >> $GITHUB_OUTPUT
108+ fi
102109 fi
103110 elif [[ ${{ github.event_name }} == 'push' && (${{ github.ref }} == *'alpha'* || ${{ github.ref }} == *'beta'*) ]]; then
104111 echo "version=${{ github.ref_name }}" >> $GITHUB_OUTPUT
You can’t perform that action at this time.
0 commit comments