2019-04-28 19:32:40 +07:00
|
|
|
workflow "build and test" {
|
|
|
|
resolves = [
|
|
|
|
"lint",
|
|
|
|
"test",
|
|
|
|
"branch-filter",
|
2019-04-09 04:36:39 +07:00
|
|
|
]
|
2019-04-28 19:32:40 +07:00
|
|
|
on = "push"
|
2019-04-09 04:36:39 +07:00
|
|
|
}
|
|
|
|
|
2019-04-28 19:32:40 +07:00
|
|
|
action "branch-filter" {
|
2019-04-09 04:36:39 +07:00
|
|
|
uses = "actions/bin/filter@master"
|
2019-04-28 19:32:40 +07:00
|
|
|
args = "branch"
|
2019-04-09 04:36:39 +07:00
|
|
|
}
|
|
|
|
|
2019-04-28 19:32:40 +07:00
|
|
|
action "install" {
|
|
|
|
uses = "docker://node:10"
|
|
|
|
args = "yarn install"
|
2019-04-09 04:36:39 +07:00
|
|
|
}
|
|
|
|
|
2019-04-28 19:32:40 +07:00
|
|
|
action "build" {
|
2019-04-09 04:36:39 +07:00
|
|
|
uses = "docker://node:10"
|
2019-04-28 19:32:40 +07:00
|
|
|
needs = ["install"]
|
|
|
|
args = "yarn run build"
|
2019-04-09 04:36:39 +07:00
|
|
|
}
|
|
|
|
|
2019-04-28 19:32:40 +07:00
|
|
|
action "lint" {
|
|
|
|
uses = "docker://node:10"
|
|
|
|
needs = ["install"]
|
|
|
|
args = "yarn run lint"
|
2019-04-09 04:36:39 +07:00
|
|
|
}
|
|
|
|
|
2019-04-28 19:32:40 +07:00
|
|
|
action "test" {
|
|
|
|
uses = "docker://node:10"
|
|
|
|
needs = ["build"]
|
|
|
|
args = "yarn run test"
|
2019-04-09 04:36:39 +07:00
|
|
|
}
|
|
|
|
|
2019-04-28 19:32:40 +07:00
|
|
|
workflow "release" {
|
2019-04-09 04:36:39 +07:00
|
|
|
resolves = [
|
2019-04-28 19:32:40 +07:00
|
|
|
"github-release",
|
|
|
|
"release:lint",
|
2019-04-09 04:36:39 +07:00
|
|
|
]
|
|
|
|
on = "push"
|
|
|
|
}
|
|
|
|
|
2019-04-28 19:32:40 +07:00
|
|
|
action "release:tag-filter" {
|
|
|
|
uses = "actions/bin/filter@master"
|
|
|
|
args = "tag v*"
|
2019-04-09 04:36:39 +07:00
|
|
|
}
|
|
|
|
|
2019-04-28 19:32:40 +07:00
|
|
|
action "release:install" {
|
2019-04-09 14:28:52 +07:00
|
|
|
uses = "docker://node:10"
|
2019-04-28 19:32:40 +07:00
|
|
|
needs = ["release:tag-filter"]
|
|
|
|
args = "yarn install"
|
2019-04-09 14:28:52 +07:00
|
|
|
}
|
|
|
|
|
2019-04-28 19:32:40 +07:00
|
|
|
action "release:build" {
|
|
|
|
uses = "docker://node:10"
|
|
|
|
needs = ["release:install"]
|
|
|
|
args = "yarn run build"
|
2019-04-09 14:28:52 +07:00
|
|
|
}
|
|
|
|
|
2019-04-28 19:32:40 +07:00
|
|
|
action "release:lint" {
|
|
|
|
uses = "docker://node:10"
|
|
|
|
needs = ["release:install"]
|
|
|
|
args = "yarn run lint"
|
2019-04-28 03:22:53 +07:00
|
|
|
}
|
|
|
|
|
2019-04-28 19:32:40 +07:00
|
|
|
action "release:test" {
|
|
|
|
uses = "docker://node:10"
|
|
|
|
needs = ["release:build"]
|
|
|
|
args = "yarn run test"
|
2019-04-09 14:28:52 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
action "release:publish" {
|
2019-04-28 19:32:40 +07:00
|
|
|
needs = ["release:test"]
|
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 19:32:40 +07:00
|
|
|
}
|