Skip to content

Commit 3c52e58

Browse files
committed
fix: install commitlint before using it (#24)
* feat: add commitlint action * fix: add commitlint configuration file * fix: install commitlint before using it
1 parent b28e94d commit 3c52e58

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/commitlint.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ jobs:
77
- uses: actions/checkout@v3
88
with:
99
fetch-depth: 0
10+
- name: Install commitlint
11+
run: |
12+
npm install conventional-changelog-conventionalcommits
13+
npm install commitlint@latest
1014
- name: Print versions
1115
run: |
1216
git --version
1317
node --version
1418
npm --version
1519
npx commitlint --version
16-
- name: Install commitlint
17-
run: |
18-
npm install conventional-changelog-conventionalcommits
19-
npm install commitlint@latest
2020
- name: Validate current commit (last commit) with commitlint
2121
if: github.event_name == 'push'
2222
run: npx commitlint --from HEAD~1 --to HEAD --verbose
2323
- name: Validate PR commits with commitlint
2424
if: github.event_name == 'pull_request'
25-
run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose
25+
run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose

0 commit comments

Comments
 (0)