File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -17,20 +17,22 @@ jobs:
17
17
- name : Checkout Code
18
18
uses : actions/checkout@v4
19
19
with :
20
- fetch-tags : true
20
+ fetch-depth : 0
21
21
ref : cats-${{ github.event.inputs.releaseversion }}
22
22
23
23
- name : Get Previous Tag
24
24
id : get_previous_tag
25
25
run : |
26
- TAGS=$(git tag --sort=-creatordate)
27
26
CURRENT_TAG=${GITHUB_REF#refs/tags/}
28
- PREVIOUS_TAG=$(echo "$TAGS" | grep -B 1 "$CURRENT_TAG" | head -n 1)
27
+ echo "CURRENT_TAG=$CURRENT_TAG"
28
+ PREVIOUS_TAG=$(git describe --tags --abbrev=0 $CURRENT_TAG^)
29
+ echo "PREVIOUS_TAG=$PREVIOUS_TAG"
29
30
echo "PREVIOUS_TAG=$PREVIOUS_TAG" >> $GITHUB_ENV
30
-
31
+
31
32
- name : Generate Changelog
32
33
id : generate_changelog
33
34
run : |
35
+ echo "Generating changelog from ${{ env.PREVIOUS_TAG }} to ${{ github.ref_name }}"
34
36
CHANGELOG=$(git log ${{ env.PREVIOUS_TAG }}..${{ github.ref_name }} --pretty=format:"* %s" --no-merges | grep -vE "\[maven-release-plugin\]|chore:|docs:|test:|ci:|build:")
35
37
echo "CHANGELOG<<EOF" >> $GITHUB_ENV
36
38
echo "$CHANGELOG" >> $GITHUB_ENV
You can’t perform that action at this time.
0 commit comments