Skip to content

Commit

Permalink
Merge pull request #27 from ooade/patch/add-npm-publish-workflow
Browse files Browse the repository at this point in the history
Add NPM workflow
  • Loading branch information
ooade committed Jan 23, 2021
2 parents 6ae6df1 + 82046a7 commit 97e9dc0
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-test-code.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PR Action
name: CI Tests

on:
pull_request:
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/publish-on-npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Publish on NPM

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: 'https://registry.npmjs.org'
- run: yarn install --frozen-lockfile
- run: yarn publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
<h3 align="center">~700B React Click Away Listener</h3>
<p align="center">
<a href="https://www.npmjs.org/package/react-click-away-listener"><img src="https://img.shields.io/npm/v/react-click-away-listener.svg?style=flat-square" alt="npm"></a>
<a href='https://coveralls.io/github/ooade/react-click-away-listener?branch=master'><img src='https://coveralls.io/repos/github/ooade/react-click-away-listener/badge.svg?branch=master' alt='Coverage Status' /></a>
<a href="https://coveralls.io/github/ooade/react-click-away-listener?branch=master"><img src="https://coveralls.io/repos/github/ooade/react-click-away-listener/badge.svg?branch=master" alt="Coverage Status" /></a>
<a href="https://github.com/ooade/react-click-away-listener/blob/main/.github/workflows/build-test-code.yml"><img src="https://github.com/ooade/react-click-away-listener/workflows/CI%20Tests/badge.svg" alt="CI Tests"/></a>
<a href="https://www.npmjs.org/package/react-click-away-listener"><img src="https://img.shields.io/npm/dm/react-click-away-listener.svg?style=flat-square" alt="downloads/month"></a>
<a href="http://makeapullrequest.com"><img src="https://img.shields.io/badge/PR(s)-welcome-brightgreen.svg?style=flat-square" alt="pullrequest"></a>
<a href="http://www.firsttimersonly.com"><img src="https://img.shields.io/badge/first--timers--only-friendly-blue.svg?style=flat-square" alt="firsttimersonly"></a>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-click-away-listener",
"version": "1.5.0",
"version": "1.5.1",
"description": "A simple click away listener built with React Hooks",
"main": "dist/react-click-away-listener.js",
"module": "dist/react-click-away-listener.es.js",
Expand Down

0 comments on commit 97e9dc0

Please sign in to comment.