Skip to content

Commit

Permalink
Update check changelog CI (#313)
Browse files Browse the repository at this point in the history
  • Loading branch information
ytdHuang authored Nov 18, 2024
1 parent 204fd4b commit c90a1db
Showing 1 changed file with 28 additions and 3 deletions.
31 changes: 28 additions & 3 deletions .github/workflows/ChangeLogCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,32 @@ on:
jobs:
changelog:
runs-on: ubuntu-latest
if: ${{ !github.event.pull_request.draft }}
steps:
- uses: dangoslen/changelog-enforcer@v3
with:
skipLabels: 'Skip ChangeLog'
# check whether CHANGELOG.md is updated
- uses: dangoslen/changelog-enforcer@v3
with:
skipLabels: 'Skip ChangeLog'

# check whether the format of CHANGELOG.md is correct
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: '1'
- name: Install and Run Changelog
run: |
julia -e 'import Pkg; Pkg.add("Changelog")'
julia -e 'using Changelog; Changelog.generate(Changelog.CommonMark(), "CHANGELOG.md"; repo = "qutip/QuantumToolbox.jl")'
- name: CHANGELOG Format Check
run: |
julia -e '
output = Cmd(`git diff --name-only`) |> read |> String
if output == ""
exit(0)
else
@error "The format of CHANGELOG.md is not correct !!!"
write(stdout, "Please format it by running the following command:\n")
write(stdout, "make changelog")
exit(1)
end'

0 comments on commit c90a1db

Please sign in to comment.