ci: use commitlint orb, disable commitlint during semantic-release

These changes came from what I learned while implementing
semantic-release for scratch-paint.
This commit is contained in:
Christopher Willis-Ford 2022-08-26 10:01:07 -07:00
parent c43ff12e8a
commit 8bac25cdc8

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 node: circleci/node@5
aliases: aliases:
- &release-branches - &release-branches
@ -25,7 +26,6 @@ jobs:
- checkout - checkout
- node/install-packages - node/install-packages
- run: npm test - run: npm test
- run: npx commitlint --from=`git merge-base HEAD develop`
- run: npm run build - run: npm run build
- deploy_gh_pages - deploy_gh_pages
build_and_release: build_and_release:
@ -34,10 +34,12 @@ jobs:
- checkout - checkout
- node/install-packages - node/install-packages
- run: npm test - run: npm test
- run: npx commitlint --from='HEAD~1'
- run: npm run build - run: npm run build
- deploy_gh_pages - deploy_gh_pages
- run: npx semantic-release - run:
command: npx semantic-release
environment:
HUSKY: 0 # disable Husky hooks so commitlint doesn't block semantic-release
update_i18n: update_i18n:
executor: node/default # defaults to LTS executor: node/default # defaults to LTS
steps: steps:
@ -46,6 +48,10 @@ jobs:
- run: npm run i18n:src && npm run i18n:push - run: npm run i18n:src && npm run i18n:push
workflows: workflows:
version: 2 version: 2
commitlint:
jobs:
- commitlint/lint:
target-branch: develop
build_no_release: build_no_release:
jobs: jobs:
- build_no_release: - build_no_release: