From 1f867fe6ca3e420fbaef3c96477e54eb817894f5 Mon Sep 17 00:00:00 2001 From: Santhosh Murugaiah Date: Thu, 12 Oct 2023 17:43:54 +0530 Subject: [PATCH] Update and rename npm-publish-github-packages.yml to npm-publish.yml --- .../workflows/npm-publish-github-packages.yml | 33 ------------------- .github/workflows/npm-publish.yml | 19 +++++++++++ 2 files changed, 19 insertions(+), 33 deletions(-) delete mode 100644 .github/workflows/npm-publish-github-packages.yml create mode 100644 .github/workflows/npm-publish.yml diff --git a/.github/workflows/npm-publish-github-packages.yml b/.github/workflows/npm-publish-github-packages.yml deleted file mode 100644 index c2490ef..0000000 --- a/.github/workflows/npm-publish-github-packages.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Node.js Package - -on: - release: - types: [created] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 16 - - run: npm ci - - run: npm test - - publish-gpr: - needs: build - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 16 - registry-url: https://npm.pkg.github.com/ - - run: npm ci - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}} diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 0000000..242b56e --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,19 @@ +name: Publish Package to npmjs + +on: + release: + types: [published] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v3 + with: + node-version: '16.x' + registry-url: 'https://registry.npmjs.org' + - run: npm ci + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}