From 307f8cc606ab2c9e5cb177286fcb9acfe628f371 Mon Sep 17 00:00:00 2001 From: Mobashir Farhan <43913808+FarhanMobashir@users.noreply.github.com> Date: Sat, 2 Jul 2022 00:02:56 +0530 Subject: [PATCH] adds github action --- .github/workflows/node.js.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/node.js.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000..0d48c9e --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,21 @@ +name: Publish to NPM +on: + release: + types: [created] +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Node + uses: actions/setup-node@v2 + with: + node-version: '14.x' + registry-url: 'https://registry.npmjs.org' + - name: Install dependencies and build 🔧 + run: npm install && npm run build + - name: Publish package on NPM 📦 + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}