11version : 2.1
22orbs :
3- browser-tools :
circleci/[email protected] 3+ browser-tools :
circleci/[email protected] 4+ commitlint :
conventional-changelog/[email protected] 5+ 46aliases :
57 - &save_git_cache
68 save_cache :
@@ -42,10 +44,12 @@ aliases:
4244 - v3-npm-
4345 - &defaults
4446 docker :
45- - image : cimg/node:12.22.11-browsers
47+ # TODO: fix scratch-audio and change this to `cimg/node:lts-browsers`
48+ - image : cimg/node:14.20-browsers
4649 auth :
4750 username : $DOCKERHUB_USERNAME
4851 password : $DOCKERHUB_PASSWORD
52+ executor : node/default
4953 working_directory : ~/repo
5054
5155jobs :
5761 steps :
5862 - *restore_git_cache
5963 - checkout
60- - run : npm ci
64+ - node/install-packages
6165 - run :
6266 name : Lint
6367 command : npm run test:lint -- --quiet --output-file test-results/eslint-results.xml --format junit
9094 steps :
9195 - *restore_git_cache
9296 - checkout
93- - run : npm ci
97+ - node/install-packages
9498 - *save_git_cache
9599 - *save_npm_cache
96100 lint :
@@ -173,27 +177,19 @@ jobs:
173177
174178 deploy-npm :
175179 << : *defaults
176- environment :
177- NODE_OPTIONS : --max-old-space-size=4000
178180 steps :
179181 - *restore_git_cache
180- - *restore_dist_cache
181182 - checkout
182- - run : |
183- echo export RELEASE_VERSION="0.1.0-prerelease.$(date +'%Y%m%d%H%M%S')" >> $BASH_ENV
184- echo export NPM_TAG=latest >> $BASH_ENV
185- if [ "$CIRCLE_BRANCH" == "master" ]
186- then echo export NPM_TAG=stable >> $BASH_ENV
187- fi
188- if [[ "$CIRCLE_BRANCH" == hotfix/* ]] # double brackets are important for matching the wildcard
189- then echo export NPM_TAG=hotfix >> $BASH_ENV
190- fi
191- - run : npm version --no-git-tag-version $RELEASE_VERSION
192- - run : |
193- npm set //registry.npmjs.org/:_authToken=$NPM_TOKEN
194- npm publish --tag $NPM_TAG
195- - run : git tag $RELEASE_VERSION
196- - run : git push $CIRCLE_REPOSITORY_URL $RELEASE_VERSION
183+ - *restore_npm_cache
184+ - *restore_dist_cache
185+ - run :
186+ name : adjust config for hotfix if necessary
187+ command : |
188+ # double brackets are important for matching the wildcard
189+ if [[ "$CIRCLE_BRANCH" == hotfix/* ]]; then
190+ sed -e "s|hotfix/REPLACE|${CIRCLE_BRANCH}|" --in-place release.config.js
191+ fi
192+ - run : npx semantic-release
197193
198194 deploy-gh-pages :
199195 << : *defaults
@@ -217,6 +213,10 @@ jobs:
217213
218214workflows :
219215 version : 2
216+ commitlint :
217+ jobs :
218+ - commitlint/lint :
219+ target-branch : develop
220220 push-translations :
221221 triggers :
222222 - schedule :
0 commit comments