File tree Expand file tree Collapse file tree 1 file changed +23
-11
lines changed Expand file tree Collapse file tree 1 file changed +23
-11
lines changed Original file line number Diff line number Diff line change 1
1
---
2
+ release_tags : &release_tags
3
+ tags :
4
+ only : /^v\d+(\.\d+){2}(-.*)?$/
5
+
2
6
# "Include" for unit tests definition.
3
7
unit_tests : &unit_tests
4
8
steps :
5
9
- checkout
6
- - run :
7
- name : Configure npm to allow running scripts as root.
8
- command : npm config set unsafe-perm true
9
10
- run :
10
11
name : Install modules and dependencies.
11
12
command : npm install
@@ -22,10 +23,14 @@ workflows:
22
23
version : 2
23
24
tests :
24
25
jobs :
25
- - node4
26
- - node6
27
- - node8
28
- - node9
26
+ - node4 :
27
+ filters : *release_tags
28
+ - node6 :
29
+ filters : *release_tags
30
+ - node8 :
31
+ filters : *release_tags
32
+ - node9 :
33
+ filters : *release_tags
29
34
- publish_npm :
30
35
requires :
31
36
- node4
@@ -35,35 +40,42 @@ workflows:
35
40
filters :
36
41
branches :
37
42
ignore : /.*/
38
- tags :
39
- only : /^v[\d.]+$/
43
+ << : *release_tags
40
44
41
45
jobs :
42
46
node4 :
43
47
docker :
44
48
- image : node:4
49
+ user : node
45
50
<< : *unit_tests
46
51
node6 :
47
52
docker :
48
53
- image : node:6
54
+ user : node
49
55
<< : *unit_tests
50
56
node8 :
51
57
docker :
52
58
- image : node:8
59
+ user : node
53
60
<< : *unit_tests
54
61
node9 :
55
62
docker :
56
63
- image : node:9
64
+ user : node
57
65
<< : *unit_tests
58
66
59
67
publish_npm :
60
68
docker :
61
69
- image : node:8
70
+ user : node
62
71
steps :
63
72
- checkout
64
73
- run :
65
74
name : Set NPM authentication.
66
75
command : echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
67
76
- run :
68
- name : Publish the module to npm.
69
- command : npm publish
77
+ name : Install modules and dependencies.
78
+ command : npm install
79
+ - run :
80
+ name : Publish the module to npm.
81
+ command : npm publish
You can’t perform that action at this time.
0 commit comments