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