1
- workflow "build and test" {
2
- resolves = [
3
- " lint" ,
4
- " test" ,
5
- " branch-filter" ,
1
+ workflow "build & test" {
2
+ resolves = [,
3
+ " node:12"
6
4
]
7
- on = " push "
5
+ on = " pull_request "
8
6
}
9
7
10
- action "branch- filter" {
8
+ action "PR: filter" {
11
9
uses = " actions/bin/filter@master"
12
- args = " branch "
10
+ args = " action 'opened|synchronize' "
13
11
}
14
12
15
- action "install" {
16
- uses = " docker://node:10"
17
- args = " yarn install"
13
+ action "node:8" {
14
+ needs = [" PR:filter" ]
15
+ uses = " docker://node:8"
16
+ args = " sh scripts/build-test.sh"
18
17
}
19
18
20
- action "build" {
19
+ action "node:10" {
20
+ needs = [" PR:filter" ]
21
21
uses = " docker://node:10"
22
- needs = [" install" ]
23
- args = " yarn run build"
22
+ args = " sh scripts/build-test.sh"
24
23
}
25
24
26
- action "lint " {
27
- uses = " docker://node:10 "
28
- needs = [ " install " ]
29
- args = " yarn run lint "
25
+ action "node:11 " {
26
+ needs = [ " PR:filter " ]
27
+ uses = " docker://node:11 "
28
+ args = " sh scripts/build-test.sh "
30
29
}
31
30
32
- action "test" {
33
- uses = " docker://node:10"
34
- needs = [" build" ]
35
- args = " yarn run test"
31
+ action "node:12" {
32
+ needs = [
33
+ " node:8" ,
34
+ " node:10" ,
35
+ " node:11"
36
+ ]
37
+ uses = " docker://node:12"
38
+ args = " sh scripts/build-test.sh"
36
39
}
37
40
38
- workflow "release" {
41
+ workflow "build, test & release" {
39
42
resolves = [
40
- " github-release" ,
41
- " release:lint" ,
43
+ " github-release"
42
44
]
43
45
on = " push"
44
46
}
45
47
46
- action "release:tag-filter " {
47
- uses = " actions/bin/filter@master "
48
- args = " tag v* "
48
+ action "push:node:8 " {
49
+ uses = " docker://node:8 "
50
+ args = " sh scripts/build-test.sh "
49
51
}
50
52
51
- action "release:install " {
53
+ action "push:node:10 " {
52
54
uses = " docker://node:10"
53
- needs = [" release:tag-filter" ]
54
- args = " yarn install"
55
+ args = " sh scripts/build-test.sh"
55
56
}
56
57
57
- action "release:build" {
58
- uses = " docker://node:10"
59
- needs = [" release:install" ]
60
- args = " yarn run build"
58
+ action "push:node:11" {
59
+ uses = " docker://node:11"
60
+ args = " sh scripts/build-test.sh"
61
61
}
62
62
63
- action "release:lint" {
64
- uses = " docker://node:10"
65
- needs = [" release:install" ]
66
- args = " yarn run lint"
63
+ action "push:node:12" {
64
+ needs = [
65
+ " push:node:8" ,
66
+ " push:node:10" ,
67
+ " push:node:11" ,
68
+ ]
69
+ uses = " docker://node:12"
70
+ args = " sh scripts/build-test.sh"
67
71
}
68
72
69
- action "release:test" {
70
- uses = " docker://node:10"
71
- needs = [" release:build" ]
72
- args = " yarn run test"
73
+ action "release:filter" {
74
+ needs = [
75
+ " push:node:12"
76
+ ]
77
+ uses = " actions/bin/filter@master"
78
+ args = " tag v*"
79
+ }
80
+
81
+ action "release:authorization" {
82
+ needs = [" release:filter" ]
83
+ uses = " actions/bin/filter@master"
84
+ args = [" actor" , " ayusharma" , " juanpicado" ]
73
85
}
74
86
75
87
action "release:publish" {
76
- needs = [" release:test" ]
88
+ needs = [
89
+ " release:authorization"
90
+ ]
77
91
uses = " docker://node:10"
78
92
args = " sh scripts/publish.sh"
79
93
secrets = [
@@ -91,4 +105,4 @@ action "github-release" {
91
105
secrets = [
92
106
" GITHUB_TOKEN" ,
93
107
]
94
- }
108
+ }
0 commit comments