@@ -6,7 +6,7 @@ node-defaults: &node-defaults
66 working_directory : *workspace
77 executor :
88 name : node/default
9- tag : 13.10.1
9+ tag : 22.14.0
1010
1111release-filter : &release-filter
1212 filters :
@@ -16,53 +16,51 @@ release-filter: &release-filter
1616 ignore : /.*/
1717
1818orbs :
19- node : circleci/node@1 .1.6
19+ node : circleci/node@7 .1.0
2020
2121jobs :
2222 build-and-test :
2323 << : *node-defaults
2424 steps :
2525 - checkout
26- - node/with-cache :
27- steps :
28- - run : npm install
29- - run : npm test -- --verbose
26+ - node/install-packages :
27+ pkg-manager : npm
28+ - run : npm test -- --verbose
3029 - persist_to_workspace :
3130 root : .
3231 paths : .
3332
3433 publish-release :
3534 << : *node-defaults
3635 steps :
36+ - add_ssh_keys :
37+ fingerprints :
38+ - " SHA256:7SVF3W6ho6Rati2rOygoU2UtEH8EGZ43q8FhcHER9Bc"
3739 - checkout
3840 - attach_workspace :
3941 at : *workspace
40- - node/with-cache :
41- steps :
42- - run :
43- name : Validate release version
44- command : |
45- TAG=${CIRCLE_TAG:1}
46- CURRENT_VERSION=$(node -p "require('./package.json').version")
47- if [ "$TAG" == "$CURRENT_VERSION" ]; then
48- echo "Release tag matches current version"
49- else
50- echo "Release tag does not match current version"
51- exit 1
52- fi
53- - run : echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > $PWD/.npmrc
54- - run : npm publish
55- - run : echo 'export DEFAULT_BRANCH=$(git remote show origin | grep HEAD | cut -d ":" -f2- | xargs)' >> $BASH_ENV
56- - run :
57- name : Set git information
58- command : |
59- git config --global user.email "twilio-sdk-build@twilio.com"
60- git config --global user.name "twilio-sdk-build"
61- - run : git checkout $DEFAULT_BRANCH
62- - run : npm --no-git-tag-version version patch
63- - run : git add package.json
64- - run : git commit -m "Bump version after release [skip ci]"
65- - run : git push origin $DEFAULT_BRANCH
42+ - node/install-packages :
43+ pkg-manager : npm
44+ - run :
45+ name : Validate release version
46+ command : |
47+ TAG=${CIRCLE_TAG:1}
48+ CURRENT_VERSION=$(node -p "require('./package.json').version")
49+ if [ "$TAG" == "$CURRENT_VERSION" ]; then
50+ echo "Release tag matches current version"
51+ else
52+ echo "Release tag does not match current version"
53+ exit 1
54+ fi
55+ - run : echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > $PWD/.npmrc
56+ - run : npm publish
57+ - run : echo 'export DEFAULT_BRANCH=$(git remote show origin | grep HEAD | cut -d ":" -f2- | xargs)' >> $BASH_ENV
58+ - run : git checkout $DEFAULT_BRANCH
59+ - run : npm --no-git-tag-version version patch
60+ - run : git add package.json
61+ - run : git add package-lock.json
62+ - run : git commit -m "Bump version after release [skip ci]"
63+ - run : git push origin $DEFAULT_BRANCH
6664
6765workflows :
6866 build-and-test :
0 commit comments