From 2f4324022f0cec5096ff6bad0988ef746aebd7e3 Mon Sep 17 00:00:00 2001 From: akbaruddin Date: Sat, 23 Jul 2022 17:37:32 +0530 Subject: [PATCH] release ci --- .github/workflows/npm-publish.yml | 7 ++++--- .npmrc | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 .npmrc diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index af7e604..72fed98 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -1,7 +1,7 @@ # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created # For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages -name: Node.js Package +name: Publish package to GitHub Packages on: release: @@ -25,8 +25,9 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 16 - registry-url: https://registry.npmjs.org/ + registry-url: 'https://npm.pkg.github.com' + scope: '@octocat' - run: npm ci - run: npm publish env: - NODE_AUTH_TOKEN: ${{secrets.npm_token}} + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..195cb45 --- /dev/null +++ b/.npmrc @@ -0,0 +1,3 @@ +//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN} +@octocat:registry=https://npm.pkg.github.com +always-auth=true \ No newline at end of file