From 11b4124c9003726d29bc357b3a870d1753c1f19a Mon Sep 17 00:00:00 2001 From: Digen More Date: Sun, 22 Dec 2024 13:24:47 +0530 Subject: [PATCH] Update GitHub Actions workflow to support additional Node.js versions and improve npm authentication --- .github/workflows/publish.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b39934e..eb83011 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,16 +11,18 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [20.x, 23.x] + node-version: [18.x, 20.x, 21.x] steps: - name: checkout uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} registry-url: https://registry.npmjs.org/ + - name: Log in to npm + run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc - name: 🚀 Publish run: npm publish --access public env: - NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}} + NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}