File tree Expand file tree Collapse file tree 1 file changed +17
-5
lines changed
Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -34,12 +34,24 @@ jobs:
3434
3535 # Read and increment version name
3636 IFS='.' read -r major minor patch < versionName.txt
37- current_patch_version_name="$major.$minor.$patch"
38- echo "VERSION_NAME=$current_patch_version_name" >> $GITHUB_OUTPUT
37+
38+ if [[ "$commit_message" =~ ^feat: ]]; then
39+ next_minor=$((minor + 1))
40+ next_patch=0
41+ else
42+ next_minor=$((minor))
43+ next_patch=$((patch + 1))
44+ fi
45+ next_version_name="$major.$next_minor.$next_patch"
46+ echo "VERSION_NAME=$next_version_name" >> $GITHUB_OUTPUT
47+ echo "$next_version_name" > versionName.txt
48+
49+ # Read and increment version code
50+ read -r version_code < versionCode.txt
3951
40- next_patch =$((patch + 1))
41- next_patch_version_name="$major.$minor.$next_patch"
42- echo "$next_patch_version_name " > versionName .txt
52+ new_version_code =$((version_code + 1))
53+ echo "VERSION_CODE=$new_version_code" >> $GITHUB_OUTPUT
54+ echo "$new_version_code " > versionCode .txt
4355
4456 # Read and increment version code
4557 read -r version_code < versionCode.txt
You can’t perform that action at this time.
0 commit comments