Skip to content

Commit

Permalink
🐠 Add workflow to release npm packages through Github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
igrybkov committed Jan 8, 2019
1 parent aed84f7 commit eb31df4
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/main.workflow
Original file line number Diff line number Diff line change
@@ -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"]
}

0 comments on commit eb31df4

Please sign in to comment.