Skip to content

Commit 880b51e

Browse files
authored
increment minor version instead of patch (#114)
1 parent a958f73 commit 880b51e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,12 @@ jobs:
5151
CURRENT_VERSION=$(jq -r '.packageDirectories[] | select(.default == true) | .versionNumber' sfdx-project.json | sed 's/\.NEXT$//')
5252
echo "Current version: $CURRENT_VERSION"
5353
if [[ "${{ github.event_name }}" == "push" && "${{ steps.check-changes.outputs.changed }}" == "false" ]]; then
54-
# 1. On push AND sfdx-project.json was NOT updated - increment the version
54+
# 1. On push AND sfdx-project.json was NOT updated - increment the minor version
5555
IFS='.' read -ra VERSION_PARTS <<< "$CURRENT_VERSION"
5656
MAJOR=${VERSION_PARTS[0]}
5757
MINOR=${VERSION_PARTS[1]}
58-
PATCH=${VERSION_PARTS[2]}
59-
NEW_PATCH=$((PATCH + 1))
60-
NEW_VERSION="$MAJOR.$MINOR.$NEW_PATCH"
58+
NEW_MINOR=$((MINOR + 1))
59+
NEW_VERSION="$MAJOR.$NEW_MINOR.0"
6160
echo "Auto-incremented version to: $NEW_VERSION"
6261
elif [[ "${{ github.event_name }}" == "workflow_dispatch" && -n "${{ inputs.version }}" ]]; then
6362
# 2. On workflow dispatch & a version input is provided - use the version input

0 commit comments

Comments
 (0)