From c1a027139b1542a3ae32b148c1fcf229647cadfd Mon Sep 17 00:00:00 2001 From: priyagupta108 Date: Mon, 5 Feb 2024 14:31:30 +0530 Subject: [PATCH] test --- .../workflows/npm-publish-github-packages.yml | 40 ++++++++++++------- package.json | 2 +- 2 files changed, 26 insertions(+), 16 deletions(-) diff --git a/.github/workflows/npm-publish-github-packages.yml b/.github/workflows/npm-publish-github-packages.yml index c109c5d..61e2d2a 100644 --- a/.github/workflows/npm-publish-github-packages.yml +++ b/.github/workflows/npm-publish-github-packages.yml @@ -1,22 +1,32 @@ -name: Node.js CI +name: Node.js Package on: push: - branches: [ yarn-test ] - + branches: + - yarn-test jobs: - build: + publish-gpr: runs-on: ubuntu-latest - + permissions: + contents: read + packages: write steps: - - uses: actions/checkout@v4 - - uses: dmitry-shibanov/setup-node@v-dmshib/fix-arm64-for-windows - with: - node-version: '20' - cache: 'yarn' - - run: yarn install - - run: yarn test - - run: yarn publish - env: - NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} + - uses: actions/checkout@v4 + - run: corepack enable + - uses: dmitry-shibanov/setup-node@v-dmshib/fix-arm64-for-windows + with: + node-version: 20 + cache: 'yarn' + registry-url: https://npm.pkg.github.com + scope: '@priyagupta108' + - name: Prepare NPM credentials + run: | + echo npmAuthToken: "$NODE_AUTH_TOKEN" >> ./.yarnrc.yml + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - run: yarn npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} + \ No newline at end of file diff --git a/package.json b/package.json index d5f6722..c5c7c89 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@priyagupta108/sample-node", - "version": "1.0.4", + "version": "1.0.5", "description": "sample-node application", "main": "index.js", "scripts": {