scratch-semantic-release-co.../.circleci/config.yml

41 lines
792 B
YAML
Raw Normal View History

2022-05-20 17:17:27 -04:00
version: 2.1
orbs:
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
2022-05-20 18:46:18 -04:00
- run: npx commitlint --from=`git merge-base HEAD main`
2022-05-20 17:17:27 -04:00
main-job:
<<: *defaults
steps:
- checkout
- node/install-packages
- run: npm test
2022-05-20 18:46:18 -04:00
- run: npx commitlint --from='HEAD~1'
- run: npx semantic-release
2022-05-20 17:17:27 -04:00
workflows:
version: 2
branch-workflow:
jobs:
- branch-job:
filters:
branches:
ignore:
- main
main-workflow:
jobs:
- main-job:
filters:
branches:
only:
- main