File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change 1+ # CHANGELOG.md is generated by https://github.com/github-changelog-generator/github-changelog-generator
2+ # This job verifies, that it contains always the current content
3+ name : Check Changelog
4+
5+ on :
6+ push :
7+ branches :
8+ - main
9+ paths-ignore :
10+ - ' **.md'
11+ workflow_dispatch :
12+
13+ jobs :
14+ check-changelog :
15+ runs-on : ubuntu-latest
16+
17+ steps :
18+ - uses : actions/checkout@v2
19+
20+ - uses : ruby/setup-ruby@v1
21+ with :
22+ ruby-version : 2.7
23+ bundler-cache : true
24+
25+ - name : Install github_changelog_generator
26+ shell : bash
27+ run : |
28+ gem --user-install install github_changelog_generator
29+
30+ - name : Run github_changelog_generator
31+ shell : bash
32+ run : |
33+ github_changelog_generator --token ${{ secrets.GITHUB_TOKEN }}
34+
35+ - name : Compare the expected and actual CHANGELOG.md
36+ run : |
37+ if [ "$(git diff CHANGELOG.md | wc -l)" -gt "0" ]; then
38+ echo "Detected uncommitted changes after build. See status below:"
39+ git diff
40+ exit 1
41+ fi
42+ id : diff
43+
44+ # If CHANGELOG.md was different than expected, upload the expected version as an artifact
45+ - uses : actions/upload-artifact@v2
46+ if : ${{ failure() && steps.diff.conclusion == 'failure' }}
47+ with :
48+ name : changelog
49+ path : CHANGELOG.md
You can’t perform that action at this time.
0 commit comments