scratch-semantic-release-co.../.circleci/config.yml
Christopher Willis-Ford 732e1e11eb ci: use commitlint orb
2022-08-26 10:38:21 -07:00

43 lines
819 B
YAML

version: 2.1
orbs:
commitlint: conventional-changelog/commitlint@1.0.0
node: circleci/node@5.0.2
alias:
- &defaults
docker:
- image: cimg/node:lts
executor: node/default
jobs:
branch-job:
<<: *defaults
steps:
- checkout
- node/install-packages
- run: npm test
main-job:
<<: *defaults
steps:
- checkout
- node/install-packages
- run: npm test
- run: npx semantic-release
workflows:
version: 2
commitlint:
jobs:
- commitlint/lint:
target-branch: main
branch-workflow:
jobs:
- branch-job:
filters:
branches:
ignore:
- main
main-workflow:
jobs:
- main-job:
filters:
branches:
only:
- main