From 425f6e4f26355f31562194160c4df7fbea1d8e51 Mon Sep 17 00:00:00 2001 From: NeTT <56877379+retraigo@users.noreply.github.com> Date: Thu, 13 Jan 2022 10:57:48 +0530 Subject: [PATCH] Update setup-node.yml --- .github/workflows/setup-node.yml | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/.github/workflows/setup-node.yml b/.github/workflows/setup-node.yml index fa836e7..61ecd65 100644 --- a/.github/workflows/setup-node.yml +++ b/.github/workflows/setup-node.yml @@ -1,12 +1,17 @@ -name: Setup Node.js environment -- uses: actions/setup-node@v2.5.1 -steps: -- uses: actions/checkout@v2 -- uses: actions/setup-node@v2 - with: - node-version: '14.x' - registry-url: 'https://registry.npmjs.org' -- run: npm install -- run: npm publish - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file +name: Publish Package to npmjs +on: + release: + types: [created] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: '14.x' + registry-url: 'https://registry.npmjs.org' + - run: npm install + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}