2019-04-28 03:22:53 +07:00
|
|
|
workflow "build & test" {
|
|
|
|
resolves = [,
|
|
|
|
"node:12"
|
2019-04-09 04:36:39 +07:00
|
|
|
]
|
2019-04-28 03:22:53 +07:00
|
|
|
on = "pull_request"
|
2019-04-09 04:36:39 +07:00
|
|
|
}
|
|
|
|
|
2019-04-28 03:22:53 +07:00
|
|
|
action "PR:filter" {
|
2019-04-09 04:36:39 +07:00
|
|
|
uses = "actions/bin/filter@master"
|
2019-04-28 03:22:53 +07:00
|
|
|
args = "action 'opened|synchronize'"
|
2019-04-09 04:36:39 +07:00
|
|
|
}
|
|
|
|
|
2019-04-28 03:22:53 +07:00
|
|
|
action "node:8" {
|
|
|
|
needs = ["PR:filter"]
|
|
|
|
uses = "docker://node:8"
|
|
|
|
args = "sh scripts/build-test.sh"
|
2019-04-09 04:36:39 +07:00
|
|
|
}
|
|
|
|
|
2019-04-28 03:22:53 +07:00
|
|
|
action "node:10" {
|
|
|
|
needs = ["PR:filter"]
|
2019-04-09 04:36:39 +07:00
|
|
|
uses = "docker://node:10"
|
2019-04-28 03:22:53 +07:00
|
|
|
args = "sh scripts/build-test.sh"
|
2019-04-09 04:36:39 +07:00
|
|
|
}
|
|
|
|
|
2019-04-28 03:22:53 +07:00
|
|
|
action "node:11" {
|
|
|
|
needs = ["PR:filter"]
|
|
|
|
uses = "docker://node:11"
|
|
|
|
args = "sh scripts/build-test.sh"
|
2019-04-09 04:36:39 +07:00
|
|
|
}
|
|
|
|
|
2019-04-28 03:22:53 +07:00
|
|
|
action "node:12" {
|
|
|
|
needs = [
|
|
|
|
"node:8",
|
|
|
|
"node:10",
|
|
|
|
"node:11"
|
|
|
|
]
|
|
|
|
uses = "docker://node:12"
|
|
|
|
args = "sh scripts/build-test.sh"
|
2019-04-09 04:36:39 +07:00
|
|
|
}
|
|
|
|
|
2019-04-28 03:22:53 +07:00
|
|
|
workflow "build, test & release" {
|
2019-04-09 04:36:39 +07:00
|
|
|
resolves = [
|
2019-04-28 03:22:53 +07:00
|
|
|
"github-release"
|
2019-04-09 04:36:39 +07:00
|
|
|
]
|
|
|
|
on = "push"
|
|
|
|
}
|
|
|
|
|
2019-04-28 03:22:53 +07:00
|
|
|
action "push:node:8" {
|
|
|
|
uses = "docker://node:8"
|
|
|
|
args = "sh scripts/build-test.sh"
|
2019-04-09 04:36:39 +07:00
|
|
|
}
|
|
|
|
|
2019-04-28 03:22:53 +07:00
|
|
|
action "push:node:10" {
|
2019-04-09 14:28:52 +07:00
|
|
|
uses = "docker://node:10"
|
2019-04-28 03:22:53 +07:00
|
|
|
args = "sh scripts/build-test.sh"
|
2019-04-09 14:28:52 +07:00
|
|
|
}
|
|
|
|
|
2019-04-28 03:22:53 +07:00
|
|
|
action "push:node:11" {
|
|
|
|
uses = "docker://node:11"
|
|
|
|
args = "sh scripts/build-test.sh"
|
2019-04-09 14:28:52 +07:00
|
|
|
}
|
|
|
|
|
2019-04-28 03:22:53 +07:00
|
|
|
action "push:node:12" {
|
|
|
|
needs = [
|
|
|
|
"push:node:8",
|
|
|
|
"push:node:10",
|
|
|
|
"push:node:11",
|
|
|
|
]
|
|
|
|
uses = "docker://node:12"
|
|
|
|
args = "sh scripts/build-test.sh"
|
2019-04-09 14:28:52 +07:00
|
|
|
}
|
|
|
|
|
2019-04-28 03:22:53 +07:00
|
|
|
action "release:filter" {
|
|
|
|
needs = [
|
|
|
|
"push:node:12"
|
|
|
|
]
|
|
|
|
uses = "actions/bin/filter@master"
|
|
|
|
args = "tag v*"
|
|
|
|
}
|
|
|
|
|
|
|
|
action "release:authorization" {
|
|
|
|
needs = ["release:filter"]
|
|
|
|
uses = "actions/bin/filter@master"
|
|
|
|
args = ["actor", "ayusharma", "juanpicado"]
|
2019-04-09 14:28:52 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
action "release:publish" {
|
2019-04-28 03:22:53 +07:00
|
|
|
needs = [
|
|
|
|
"release:authorization"
|
|
|
|
]
|
2019-04-09 04:36:39 +07:00
|
|
|
uses = "docker://node:10"
|
|
|
|
args = "sh scripts/publish.sh"
|
|
|
|
secrets = [
|
|
|
|
"REGISTRY_AUTH_TOKEN",
|
|
|
|
]
|
|
|
|
env = {
|
2019-04-14 05:25:45 +07:00
|
|
|
REGISTRY_URL = "registry.npmjs.org"
|
2019-04-09 04:36:39 +07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
action "github-release" {
|
2019-04-09 14:28:52 +07:00
|
|
|
needs = ["release:publish"]
|
2019-04-09 04:36:39 +07:00
|
|
|
uses = "docker://node:10"
|
|
|
|
args = "sh scripts/github-release.sh"
|
|
|
|
secrets = [
|
|
|
|
"GITHUB_TOKEN",
|
|
|
|
]
|
2019-04-28 03:22:53 +07:00
|
|
|
}
|