Skip to content

Commit 01bb9e5

Browse files
authored
Validate changelog during CI (#79)
A "Validate changelog" step has been added to CI to validate the changelog on each PR. It will use the `--rc` flag as well when run on a release branch.
1 parent e7811f9 commit 01bb9e5

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/build-lint-test.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,28 @@ jobs:
3434
- run: yarn build
3535
- run: yarn lint
3636
- run: yarn test
37+
validate-changelog:
38+
name: Validate changelog
39+
runs-on: ubuntu-20.04
40+
steps:
41+
- uses: actions/checkout@v2
42+
- name: Use Node.js v12
43+
uses: actions/setup-node@v1
44+
with:
45+
node-version: 12
46+
- run: yarn --frozen-lockfile
47+
- run: yarn build
48+
- name: Validate RC changelog
49+
if: ${{ startsWith(github.ref, 'release-v') }}
50+
run: yarn changelog validate --rc
51+
- name: Validate changelog
52+
if: ${{ !startsWith(github.ref, 'release-v') }}
53+
run: yarn changelog validate
3754
all-jobs-pass:
3855
name: All jobs pass
3956
runs-on: ubuntu-20.04
4057
needs:
4158
- build-lint-test
59+
- validate-changelog
4260
steps:
4361
- run: echo "Great success!"

0 commit comments

Comments
 (0)