Skip to content

Commit

Permalink
add npm publish job
Browse files Browse the repository at this point in the history
  • Loading branch information
kremalicious committed Jan 31, 2021
1 parent fe13c43 commit 33253f6
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,19 @@ jobs:
- run: npm ci
- run: npm test
- run: npm run build

publish:
needs: test
if: success() && startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
registry-url: 'https://registry.npmjs.org'

- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ npm run build
# publishing to npm & GitHub releases
# uses https://github.com/webpro/release-it
npm run release
npm run release minor
npm run release major
```

## Changelog
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"release": true
},
"npm": {
"publish": true
"publish": false
}
}
}

0 comments on commit 33253f6

Please sign in to comment.