@@ -6,7 +6,7 @@ node-defaults: &node-defaults
6
6
working_directory : *workspace
7
7
executor :
8
8
name : node/default
9
- tag : 13.10.1
9
+ tag : 22.14.0
10
10
11
11
release-filter : &release-filter
12
12
filters :
@@ -16,53 +16,51 @@ release-filter: &release-filter
16
16
ignore : /.*/
17
17
18
18
orbs :
19
- node : circleci/node@1 .1.6
19
+ node : circleci/node@7 .1.0
20
20
21
21
jobs :
22
22
build-and-test :
23
23
<< : *node-defaults
24
24
steps :
25
25
- 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
30
29
- persist_to_workspace :
31
30
root : .
32
31
paths : .
33
32
34
33
publish-release :
35
34
<< : *node-defaults
36
35
steps :
36
+ - add_ssh_keys :
37
+ fingerprints :
38
+ - " SHA256:7SVF3W6ho6Rati2rOygoU2UtEH8EGZ43q8FhcHER9Bc"
37
39
- checkout
38
40
- attach_workspace :
39
41
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 "[email protected] "
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
66
64
67
65
workflows :
68
66
build-and-test :
0 commit comments