File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -33,16 +33,21 @@ jobs:
3333 zip -r "../../../${zip_name}" .
3434 echo "zip_name=${zip_name}" >> $GITHUB_OUTPUT
3535
36- - name : Generate changelog
36+ - name : Generate changelog with commit links
3737 id : changelog
3838 run : |
39+ repo_url="https://github.com/${{ github.repository }}"
3940 git fetch --prune --unshallow
4041 previous_tag=$(git tag --sort=-creatordate | tail -n 1)
4142 if [ -z "$previous_tag" ]; then
42- changelog=$(git log --pretty=format:"* %s")
43+ range=""
4344 else
44- changelog=$(git log $ previous_tag..HEAD --pretty=format:"* %s")
45+ range="$ previous_tag..HEAD"
4546 fi
47+ changelog=""
48+ while read -r hash message; do
49+ changelog="${changelog}* [${message}](${repo_url}/commit/${hash})"$'\n'
50+ done < <(git log $range --pretty=format:"%H %s")
4651 echo "changelog<<EOF" >> $GITHUB_ENV
4752 echo "$changelog" >> $GITHUB_ENV
4853 echo "EOF" >> $GITHUB_ENV
You can’t perform that action at this time.
0 commit comments