diff --git a/.github/main.workflow b/.github/main.workflow new file mode 100644 index 0000000..ef1c439 --- /dev/null +++ b/.github/main.workflow @@ -0,0 +1,38 @@ +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" +} + +# Filter for version tag "v*" +action "Tag" { + needs = "Master" + uses = "actions/bin/filter@master" + args = "tag v*" +} + +action "Publish" { + needs = "Tag" + uses = "actions/npm@master" + args = "publish --access public" + secrets = ["NPM_AUTH_TOKEN"] +}