File tree Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change 4545 # Testing #
4646 # ##########
4747
48+ changelog :
49+ if : ${{ github.event_name == 'push'
50+ && startsWith(github.ref, 'refs/tags/') }}
51+ runs-on : ubuntu-latest
52+ steps :
53+ - uses : actions/checkout@v4
54+
55+ - name : Parse semver versions from Git tag
56+ id : semver
57+ uses : actions-ecosystem/action-regex-match@v2
58+ with :
59+ text : ${{ github.ref }}
60+ regex : ' ^refs/tags/((([0-9]+)\.[0-9]+)\.[0-9]+-(.+))$'
61+
62+ - name : Ensure CHANGELOG date is today
63+ run : |
64+ today="$(date '+%Y-%m-%d')"
65+ changelog="$(grep -E '^## \[${{ steps.semver.outputs.group1 }}\] ·' \
66+ CHANGELOG.md \
67+ | cut -d' ' -f4 | tr -d ' ')"
68+ echo "Changelog: $changelog"
69+ echo "Today: $today"
70+ [ "$changelog" = "$today" ]
71+
4872 test :
4973 needs : ["build"]
5074 runs-on : ubuntu-latest
7195 push :
7296 if : ${{ github.event_name == 'push'
7397 && startsWith(github.ref, 'refs/tags/') }}
74- needs : ["build", "test"]
98+ needs : ["build", "changelog", " test"]
7599 strategy :
76100 fail-fast : false
77101 matrix :
You can’t perform that action at this time.
0 commit comments