From ecb8bc0f89b07d16c7ed7b84061b2d3cda99205d Mon Sep 17 00:00:00 2001 From: Chris Ayers Date: Wed, 6 Apr 2022 11:00:46 -0700 Subject: [PATCH] added publish steps --- .github/workflows/node.js.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 2d136fd..edf6dfa 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -19,8 +19,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [12.x] - #, 14.x, 16.x] + node-version: [12.x, 14.x, 16.x] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: @@ -32,4 +31,18 @@ jobs: - run: npm ci - run: npm run build --if-present - run: npm test - + + publish-npm: + needs: build-node + runs-on: ubuntu-latest + environment: npm + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + registry-url: https://registry.npmjs.org/ + - run: npm ci + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}}