Skip to content

Commit c3b6f9f

Browse files
authored
Update action.yaml
1 parent 4040cd3 commit c3b6f9f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

actions/version_number/action.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,14 @@ runs:
7979
else
8080
echo "new_version=$NBGV_SimpleVersion-SNAPSHOT" >> $GITHUB_OUTPUT
8181
fi
82+
elif [[ "${{ inputs.type }}" == "Patch" ]]; then
83+
CURRENT_PATCH=$(echo $NBGV_SimpleVersion | awk -F. '{print $3}')
84+
HEIGHT=$NBGV_VersionHeight
85+
if [[ $HEIGHT -lt 1 ]]; then
86+
HEIGHT=1
87+
fi
88+
NEW_PATCH=$(($CURRENT_PATCH + $HEIGHT))
89+
echo "new_version=$NBGV_MajorMinorVersion.$NEW_PATCH" >> $GITHUB_OUTPUT
8290
elif [[ "$BRANCH_NAME" =~ ^release.* ]]; then
8391
git fetch --tags --all
8492
# Find the base tag that the branch derived from

0 commit comments

Comments
 (0)