File tree Expand file tree Collapse file tree 1 file changed +3
-31
lines changed Expand file tree Collapse file tree 1 file changed +3
-31
lines changed Original file line number Diff line number Diff line change 40
40
41
41
- name : Set tag name
42
42
id : set_tag_name
43
- run : |
44
- # Determine the latest tag and commit messages since that tag
45
- LAST_TAG=$(git describe --tags --abbrev=0)
46
- COMMITS=$(git log --oneline ${LAST_TAG}..HEAD --format="%s")
47
-
48
- # Initialize version components
49
- MAJOR=0
50
- MINOR=0
51
- PATCH=0
52
-
53
- # Analyze commit messages to determine version bump
54
- while read -r line; do
55
- if [[ "$line" == feat:* ]]; then
56
- # Increment minor version for feature commits
57
- ((MINOR++))
58
- elif [[ "$line" == chore:* ]]; then
59
- # Increment major version for chore commits
60
- ((MAJOR++))
61
- MINOR=0 # Reset minor version
62
- elif [[ "$line" == fix:* ]]; then
63
- # Increment patch version for fix commits
64
- ((PATCH++))
65
- fi
66
- done <<< "$COMMITS"
67
-
68
- # Determine the next version based on commit analysis
69
- NEXT_VERSION="${MAJOR}.${MINOR}.${PATCH}"
70
-
71
- echo "::set-output name=next_version::$NEXT_VERSION"
43
+ uses : martinbeentjes/npm-get-version-action@master
72
44
73
45
- name : Upload Release APK
74
46
uses : actions/upload-artifact@v2
82
54
env :
83
55
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
84
56
with :
85
- tag_name : ${{ steps.set_tag_name.outputs.next_version }}
86
- release_name : Release ${{ steps.set_tag_name.outputs.next_version }}
57
+ tag_name : ${{ steps.set_tag_name.outputs.current-version }}
58
+ release_name : Release ${{ steps.set_tag_name.outputs.current-version }}
87
59
draft : false
88
60
prerelease : false
89
61
You can’t perform that action at this time.
0 commit comments