ci: use commitlint orb

This commit is contained in:
Christopher Willis-Ford 2022-08-26 10:34:46 -07:00
parent e254188550
commit 732e1e11eb

View file

@ -1,5 +1,6 @@
version: 2.1 version: 2.1
orbs: orbs:
commitlint: conventional-changelog/commitlint@1.0.0
node: circleci/node@5.0.2 node: circleci/node@5.0.2
alias: alias:
- &defaults - &defaults
@ -13,17 +14,19 @@ jobs:
- checkout - checkout
- node/install-packages - node/install-packages
- run: npm test - run: npm test
- run: npx commitlint --from=`git merge-base HEAD main`
main-job: main-job:
<<: *defaults <<: *defaults
steps: steps:
- checkout - checkout
- node/install-packages - node/install-packages
- run: npm test - run: npm test
- run: npx commitlint --from='HEAD~1'
- run: npx semantic-release - run: npx semantic-release
workflows: workflows:
version: 2 version: 2
commitlint:
jobs:
- commitlint/lint:
target-branch: main
branch-workflow: branch-workflow:
jobs: jobs:
- branch-job: - branch-job: