File tree Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Conventional Commitlint
2
+
3
+ on :
4
+ push :
5
+ pull_request :
6
+ workflow_dispatch :
7
+
8
+ permissions :
9
+ contents : read
10
+
11
+ jobs :
12
+ commitlint :
13
+ name : Commitlint
14
+ runs-on : ubuntu-latest
15
+ steps :
16
+ - name : Checkout
17
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
18
+ with :
19
+ fetch-depth : 0
20
+
21
+ - name : Setup Node
22
+ uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
23
+ with :
24
+ node-version : lts/*
25
+ cache : yarn
26
+
27
+ - name : Install dependencies
28
+ run : yarn install --ignore-engines --frozen-lockfile
29
+
30
+ - name : Build packages
31
+ run : yarn build
32
+
33
+ - name : Print versions
34
+ run : |
35
+ git --version
36
+ node --version
37
+ npm --version
38
+ yarn --version
39
+ yarn commitlint --version
40
+
41
+ - name : Create commitlint.config.js
42
+ run : |
43
+ echo "export default { extends: ['@commitlint/config-conventional'] };" > commitlint.config.js
44
+
45
+ - name : Validate current commit (last commit) with commitlint
46
+ if : github.event_name == 'push' || github.event_name == 'workflow_dispatch'
47
+ run : yarn commitlint --last --verbose
48
+
49
+ - name : Validate PR commits with commitlint
50
+ if : github.event_name == 'pull_request'
51
+ run : yarn commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
You can’t perform that action at this time.
0 commit comments