File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change 1- # Source: https://github.com/panubo/reference-github-actions/blob/master/github-release.yml
1+ # Source: https://github.com/panubo/reference-github-actions/blob/main/github-release.yml
2+ # Description: Create a GitHub release
3+ # LICENSE: MIT License, Copyright (c) 2021-2023 Volt Grid Pty Ltd t/a Panubo
4+
5+ name : GitHub Release
26
37on :
48 push :
59 tags :
6- - ' *'
7-
8- name : GitHub Release
10+ - ' v*'
911
1012jobs :
1113 build :
@@ -14,19 +16,19 @@ jobs:
1416 steps :
1517
1618 - name : Checkout code
17- uses : actions/checkout@v2
19+ uses : actions/checkout@v3
1820 with :
19- fetch-depth : 0
21+ fetch-depth : 0 # Required for git log to work
2022
2123 - name : Get Release Notes
2224 id : get_release_notes
2325 run : |
24- NOTES=$(git log --pretty=format:%s $(git tag --sort=-refname | head -1)...$(git tag --sort=-refname | head -2 | tail -1) | awk '{ print "-", $0 }')
26+ NOTES=$(git log --pretty=format:%s $(git tag --sort=-v: refname | head -1)...$(git tag --sort=-v: refname | head -2 | tail -1) | awk '{ print "-", $0 }')
2527 NOTES="${NOTES//'%'/'%25'}"
2628 NOTES="${NOTES//$'\n'/'%0A'}"
2729 NOTES="${NOTES//$'\r'/'%0D'}"
2830 echo "NOTES: ${NOTES}"
29- echo "::set-output name= notes:: ${NOTES}"
31+ echo "notes= ${NOTES}" >> $GITHUB_OUTPUT
3032
3133 - name : Create Release
3234 id : create_release
You can’t perform that action at this time.
0 commit comments