mirror of
https://github.com/zhigang1992/example-npm.git
synced 2026-06-11 23:55:26 +08:00
Co-authored-by: Steve Winton <stevewinton@gmail.com> Co-authored-by: Steve Winton <swinton@users.noreply.github.com> Co-authored-by: Brandon Keepers <bkeepers@github.com>
30 lines
495 B
HCL
30 lines
495 B
HCL
workflow "Build, Test, and Publish" {
|
|
on = "push"
|
|
resolves = ["Publish"]
|
|
}
|
|
|
|
action "Build" {
|
|
uses = "actions/npm@master"
|
|
args = "install"
|
|
}
|
|
|
|
action "Test" {
|
|
needs = "Build"
|
|
uses = "actions/npm@master"
|
|
args = "test"
|
|
}
|
|
|
|
# Filter for master branch
|
|
action "Master" {
|
|
needs = "Test"
|
|
uses = "actions/bin/filter@master"
|
|
args = "branch master"
|
|
}
|
|
|
|
action "Publish" {
|
|
needs = "Master"
|
|
uses = "actions/npm@master"
|
|
args = "publish --access public"
|
|
secrets = ["NPM_AUTH_TOKEN"]
|
|
}
|