Skip to content

Commit b05c228

Browse files
author
roman.vasilev
committed
ci: Main workflow
1 parent 69b5ddc commit b05c228

File tree

1 file changed

+23
-8
lines changed

1 file changed

+23
-8
lines changed

.github/main.workflow

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,30 @@
1-
workflow "Build and deploy on push" {
1+
workflow "Build, Test, and Publish" {
22
on = "push"
3-
resolves = ["GitHub Action for npm", "docker://node"]
3+
resolves = ["Publish"]
44
}
55

6-
action "GitHub Action for npm" {
7-
uses = "actions/npm@59b64a598378f31e49cb76f27d6f3312b582f680"
6+
action "Build" {
7+
uses = "actions/npm@master"
88
args = "install"
99
}
1010

11-
action "docker://node" {
12-
uses = "docker://node"
13-
runs = "npm"
14-
args = "install"
11+
action "Test" {
12+
needs = "Build"
13+
uses = "actions/npm@master"
14+
args = "test"
15+
}
16+
17+
# Filter for master branch
18+
action "Master" {
19+
needs = "Test"
20+
uses = "actions/bin/filter@master"
21+
args = "branch master"
22+
}
23+
24+
action "Publish" {
25+
needs = "Master"
26+
uses = "actions/npm@master"
27+
runs = "npx"
28+
args = "semantic-release"
29+
secrets = ["NPM_TOKEN", "GITHUB_TOKEN"]
1530
}

0 commit comments

Comments
 (0)