1
0
mirror of https://github.com/SomboChea/ui synced 2024-11-16 19:24:28 +07:00
verdaccio-ui/.github/main.workflow

231 lines
4.5 KiB
Plaintext
Raw Normal View History

################################################
# Workflow for a branch push
################################################
workflow "build and test on branch" {
2019-04-28 19:32:40 +07:00
resolves = [
"branch.lint.node.10",
"branch.test.node.10",
"branch.test.node.8",
# "branch.test.node.12"
]
2019-04-28 19:32:40 +07:00
on = "push"
}
# node 10
action "branch.filter" {
uses = "actions/bin/filter@master"
2019-04-28 19:32:40 +07:00
args = "branch"
}
action "branch.install.node.10" {
needs = ["branch.filter"]
2019-04-28 19:32:40 +07:00
uses = "docker://node:10"
args = "yarn install"
}
action "branch.build.node.10" {
uses = "docker://node:10"
needs = ["branch.install.node.10"]
2019-04-28 19:32:40 +07:00
args = "yarn run build"
}
action "branch.lint.node.10" {
2019-04-28 19:32:40 +07:00
uses = "docker://node:10"
needs = ["branch.install.node.10"]
2019-04-28 19:32:40 +07:00
args = "yarn run lint"
}
action "branch.test.node.10" {
2019-04-28 19:32:40 +07:00
uses = "docker://node:10"
needs = ["branch.build.node.10"]
2019-04-28 19:32:40 +07:00
args = "yarn run test"
}
# node 8
action "branch.install.node.8" {
needs = ["branch.filter"]
uses = "docker://node:8"
args = "yarn install"
}
action "branch.build.node.8" {
uses = "docker://node:8"
needs = ["branch.install.node.8"]
args = "yarn run build"
}
action "branch.test.node.8" {
uses = "docker://node:8"
needs = ["branch.build.node.8"]
args = "yarn run test"
}
# @todo node 12
# action "branch.install.node.12" {
# needs = ["branch.filter"]
# uses = "docker://node:12"
# args = "yarn install"
# }
# action "branch.build.node.12" {
# uses = "docker://node:12"
# needs = ["branch.install.node.12"]
# args = "yarn run build"
# }
# action "branch.test.node.12" {
# uses = "docker://node:12"
# needs = ["branch.build.node.12"]
# args = "yarn run test"
# }
################################################
# Workflow for a Pull request
################################################
workflow "build and test on PR" {
resolves = [
"pr.lint.node.10",
"pr.test.node.10",
"pr.test.node.8",
# "pr.test.node.12"
]
on = "pull_request"
}
# node 10
action "pr.filter" {
uses = "actions/bin/filter@master"
args = "action 'opened|synchronize|reopened'"
}
action "pr.install.node.10" {
needs = ["pr.filter"]
uses = "docker://node:10"
args = "yarn install"
}
action "pr.build.node.10" {
uses = "docker://node:10"
needs = ["pr.install.node.10"]
args = "yarn run build"
}
action "pr.lint.node.10" {
uses = "docker://node:10"
needs = ["pr.install.node.10"]
args = "yarn run lint"
}
action "pr.test.node.10" {
uses = "docker://node:10"
needs = ["pr.build.node.10"]
args = "yarn run test"
}
# node 8
action "pr.install.node.8" {
needs = ["pr.filter"]
uses = "docker://node:8"
args = "yarn install"
}
action "pr.build.node.8" {
uses = "docker://node:8"
needs = ["pr.install.node.8"]
args = "yarn run build"
}
action "pr.test.node.8" {
uses = "docker://node:8"
needs = ["pr.build.node.8"]
args = "yarn run test"
}
# @todo node 12
# action "pr.install.node.12" {
# needs = ["pr.filter"]
# uses = "docker://node:12"
# args = "yarn install"
# }
# action "pr.build.node.12" {
# uses = "docker://node:12"
# needs = ["pr.install.node.12"]
# args = "yarn run build"
# }
# action "pr.test.node.12" {
# uses = "docker://node:12"
# needs = ["pr.build.node.12"]
# args = "yarn run test"
# }
################################################
# Workflow for a github release when a tag is
# pushed
################################################
workflow "github release" {
resolves = [
"release.github",
"release.lint",
]
on = "push"
}
action "release.filter" {
2019-04-28 19:32:40 +07:00
uses = "actions/bin/filter@master"
args = "tag v*"
}
action "release.install" {
uses = "docker://node:10"
needs = ["release.filter"]
2019-04-28 19:32:40 +07:00
args = "yarn install"
}
action "release.build" {
2019-04-28 19:32:40 +07:00
uses = "docker://node:10"
needs = ["release.install"]
2019-04-28 19:32:40 +07:00
args = "yarn run build"
}
action "release.lint" {
2019-04-28 19:32:40 +07:00
uses = "docker://node:10"
needs = ["release.install"]
2019-04-28 19:32:40 +07:00
args = "yarn run lint"
}
action "release.test" {
2019-04-28 19:32:40 +07:00
uses = "docker://node:10"
needs = ["release.build"]
2019-04-28 19:32:40 +07:00
args = "yarn run test"
}
action "release.auth" {
needs = ["release.test"]
uses = "actions/bin/filter@master"
args = ["actor", "octocat", "torvalds"]
}
action "release.npm.publish" {
needs = ["release.auth"]
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"
}
}
action "release.github" {
needs = ["release.npm.publish"]
uses = "docker://node:10"
args = "sh scripts/github-release.sh"
secrets = [
"GITHUB_TOKEN",
]
2019-04-28 19:32:40 +07:00
}