1
0
mirror of https://github.com/SomboChea/ui synced 2024-11-24 15:04:27 +07:00
verdaccio-ui/.github/main.workflow
Ayush Sharma fc114298ad chore: adds pull request action (#37)
* chore: improvements in actions

* chore: improvements in actions

* chore: improvements in actions

* chore: aggregates action in a script

* chore: minor fix

* chore: adds node 12 in action

* chore: keep node 12 after 8 10 11

* chore: keep node 12 after 8 10 11

* chore: name fixes
2019-04-27 22:22:52 +02:00

108 lines
1.8 KiB
HCL

workflow "build & test" {
resolves = [,
"node:12"
]
on = "pull_request"
}
action "PR:filter" {
uses = "actions/bin/filter@master"
args = "action 'opened|synchronize'"
}
action "node:8" {
needs = ["PR:filter"]
uses = "docker://node:8"
args = "sh scripts/build-test.sh"
}
action "node:10" {
needs = ["PR:filter"]
uses = "docker://node:10"
args = "sh scripts/build-test.sh"
}
action "node:11" {
needs = ["PR:filter"]
uses = "docker://node:11"
args = "sh scripts/build-test.sh"
}
action "node:12" {
needs = [
"node:8",
"node:10",
"node:11"
]
uses = "docker://node:12"
args = "sh scripts/build-test.sh"
}
workflow "build, test & release" {
resolves = [
"github-release"
]
on = "push"
}
action "push:node:8" {
uses = "docker://node:8"
args = "sh scripts/build-test.sh"
}
action "push:node:10" {
uses = "docker://node:10"
args = "sh scripts/build-test.sh"
}
action "push:node:11" {
uses = "docker://node:11"
args = "sh scripts/build-test.sh"
}
action "push:node:12" {
needs = [
"push:node:8",
"push:node:10",
"push:node:11",
]
uses = "docker://node:12"
args = "sh scripts/build-test.sh"
}
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"]
}
action "release:publish" {
needs = [
"release:authorization"
]
uses = "docker://node:10"
args = "sh scripts/publish.sh"
secrets = [
"REGISTRY_AUTH_TOKEN",
]
env = {
REGISTRY_URL = "registry.npmjs.org"
}
}
action "github-release" {
needs = ["release:publish"]
uses = "docker://node:10"
args = "sh scripts/github-release.sh"
secrets = [
"GITHUB_TOKEN",
]
}