2019-04-29 14:06:00 +07:00
|
|
|
################################################
|
|
|
|
# Workflow for a github release when a tag is
|
|
|
|
# pushed
|
|
|
|
################################################
|
|
|
|
workflow "github release" {
|
|
|
|
resolves = [
|
|
|
|
"release.github",
|
|
|
|
"release.lint",
|
2019-04-09 04:36:39 +07:00
|
|
|
]
|
|
|
|
on = "push"
|
|
|
|
}
|
|
|
|
|
2019-04-29 14:06:00 +07:00
|
|
|
action "release.filter" {
|
2019-04-28 19:32:40 +07:00
|
|
|
uses = "actions/bin/filter@master"
|
|
|
|
args = "tag v*"
|
2019-04-09 04:36:39 +07:00
|
|
|
}
|
|
|
|
|
2019-04-29 14:06:00 +07:00
|
|
|
action "release.install" {
|
2019-04-09 14:28:52 +07:00
|
|
|
uses = "docker://node:10"
|
2019-04-29 14:06:00 +07:00
|
|
|
needs = ["release.filter"]
|
2019-04-28 19:32:40 +07:00
|
|
|
args = "yarn install"
|
2019-04-09 14:28:52 +07:00
|
|
|
}
|
|
|
|
|
2019-04-29 14:06:00 +07:00
|
|
|
action "release.build" {
|
2019-04-28 19:32:40 +07:00
|
|
|
uses = "docker://node:10"
|
2019-04-29 14:06:00 +07:00
|
|
|
needs = ["release.install"]
|
2019-04-28 19:32:40 +07:00
|
|
|
args = "yarn run build"
|
2019-04-09 14:28:52 +07:00
|
|
|
}
|
|
|
|
|
2019-04-29 14:06:00 +07:00
|
|
|
action "release.lint" {
|
2019-04-28 19:32:40 +07:00
|
|
|
uses = "docker://node:10"
|
2019-04-29 14:06:00 +07:00
|
|
|
needs = ["release.install"]
|
2019-04-28 19:32:40 +07:00
|
|
|
args = "yarn run lint"
|
2019-04-28 03:22:53 +07:00
|
|
|
}
|
|
|
|
|
2019-04-29 14:06:00 +07:00
|
|
|
action "release.test" {
|
2019-04-28 19:32:40 +07:00
|
|
|
uses = "docker://node:10"
|
2019-04-29 14:06:00 +07:00
|
|
|
needs = ["release.build"]
|
2019-04-28 19:32:40 +07:00
|
|
|
args = "yarn run test"
|
2019-04-09 14:28:52 +07:00
|
|
|
}
|
|
|
|
|
2019-04-29 14:06:00 +07:00
|
|
|
action "release.auth" {
|
|
|
|
needs = ["release.test"]
|
|
|
|
uses = "actions/bin/filter@master"
|
|
|
|
args = ["actor", "octocat", "torvalds"]
|
|
|
|
}
|
|
|
|
|
|
|
|
action "release.npm.publish" {
|
|
|
|
needs = ["release.auth"]
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-04-29 14:06:00 +07:00
|
|
|
action "release.github" {
|
|
|
|
needs = ["release.npm.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
|
|
|
}
|