From 7f3e8f7bf8c087e580c6a1157c16fe8b06e0fb8a Mon Sep 17 00:00:00 2001 From: John Ciprian Date: Mon, 1 Aug 2022 11:32:45 -0400 Subject: [PATCH] Adding GitHub Action for publishing NPM packages --- .github/workflows/npm-publish.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/npm-publish.yml diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 0000000..d6183e6 --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,28 @@ +name: Publish Packages + +on: + release: + types: [published] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup Node.js 16 + uses: actions/setup-node@v3 + with: + node-version: 16 + cache: 'npm' + registry-url: https://registry.npmjs.org/ + + - name: Install dependencies + run: npm ci + + - name: Publish Packages + run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}}