File tree Expand file tree Collapse file tree 1 file changed +28
-3
lines changed Expand file tree Collapse file tree 1 file changed +28
-3
lines changed Original file line number Diff line number Diff line change 88jobs :
99 changelog :
1010 runs-on : ubuntu-latest
11+ if : ${{ !github.event.pull_request.draft }}
1112 steps :
12- - uses : dangoslen/changelog-enforcer@v3
13- with :
14- skipLabels : ' Skip ChangeLog'
13+ # check whether CHANGELOG.md is updated
14+ - uses : dangoslen/changelog-enforcer@v3
15+ with :
16+ skipLabels : ' Skip ChangeLog'
17+
18+ # check whether the format of CHANGELOG.md is correct
19+ - uses : actions/checkout@v4
20+ - uses : julia-actions/setup-julia@v2
21+ with :
22+ version : ' 1'
23+ - name : Install and Run Changelog
24+ run : |
25+ julia -e 'import Pkg; Pkg.add("Changelog")'
26+ julia -e 'using Changelog; Changelog.generate(Changelog.CommonMark(), "CHANGELOG.md"; repo = "qutip/QuantumToolbox.jl")'
27+
28+ - name : CHANGELOG Format Check
29+ run : |
30+ julia -e '
31+ output = Cmd(`git diff --name-only`) |> read |> String
32+ if output == ""
33+ exit(0)
34+ else
35+ @error "The format of CHANGELOG.md is not correct !!!"
36+ write(stdout, "Please format it by running the following command:\n")
37+ write(stdout, "make changelog")
38+ exit(1)
39+ end'
You can’t perform that action at this time.
0 commit comments