Skip to content

Merge pull request #95 from sidevesh/dependabot/npm_and_yarn/example/… #58

Merge pull request #95 from sidevesh/dependabot/npm_and_yarn/example/…

Merge pull request #95 from sidevesh/dependabot/npm_and_yarn/example/… #58

Workflow file for this run

name: NPM Publish
on:
push:
branches:
- master
jobs:
npm-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v1
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: 10
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: npm install
- name: Publish package
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
LATEST=`npm view . version`
CURRENT=`cat package.json | jq -r .version`
if [ "$LATEST" != "$CURRENT" ]
then
npm publish
fi