mirror of
https://github.com/scratchfoundation/scratch-semantic-release-config.git
synced 2024-11-23 16:08:09 -05:00
40 lines
792 B
YAML
40 lines
792 B
YAML
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
|
|
- run: npx commitlint --from=`git merge-base HEAD main`
|
|
main-job:
|
|
<<: *defaults
|
|
steps:
|
|
- checkout
|
|
- node/install-packages
|
|
- run: npm test
|
|
- run: npx commitlint --from='HEAD~1'
|
|
- run: npx semantic-release
|
|
workflows:
|
|
version: 2
|
|
branch-workflow:
|
|
jobs:
|
|
- branch-job:
|
|
filters:
|
|
branches:
|
|
ignore:
|
|
- main
|
|
main-workflow:
|
|
jobs:
|
|
- main-job:
|
|
filters:
|
|
branches:
|
|
only:
|
|
- main
|