Skip to content

Commit

Permalink
add release action
Browse files Browse the repository at this point in the history
  • Loading branch information
poipoii committed Sep 12, 2019
1 parent a781019 commit a77a917
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
push:
branches:
- '*'
release:
types: [published]
branches:
- master

jobs:
test:
Expand All @@ -29,3 +33,16 @@ jobs:
CI: true
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
COVERALLS_SERVICE_NAME: "Github Actions"

release:
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '10.x'
registry-url: 'https://registry.npmjs.org'
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
"test-with-coverage": "nyc npm test && nyc report --reporter=text-lcov | coveralls"
},
"main": "./lib/mailparser",
"files": [
"/lib"
],
"license": "MIT",
"dependencies": {
"addressparser": "1.0.1",
Expand Down

0 comments on commit a77a917

Please sign in to comment.