From 5884a9d7cd2ac5c1b9a0214fe4139cdb43e4fac0 Mon Sep 17 00:00:00 2001 From: mtyszczak Date: Thu, 19 Sep 2024 11:05:33 +0200 Subject: [PATCH] Add npm js registry auth token update step in github actions --- .github/workflows/npm_publish.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/npm_publish.yml b/.github/workflows/npm_publish.yml index e2f0c8f..9706d26 100644 --- a/.github/workflows/npm_publish.yml +++ b/.github/workflows/npm_publish.yml @@ -5,7 +5,7 @@ on: - "*.*.*" # This ensures the workflow runs on any newly created tag workflow_dispatch: # This allows the workflow to be triggered manually jobs: - build: + publish: runs-on: ubuntu-latest permissions: contents: read @@ -16,6 +16,6 @@ jobs: with: node-version: '18' registry-url: 'https://registry.npmjs.org' - - run: ./scripts/publish_by_tag.sh 452 "${{ github.ref_name }}" "dist/hiveio-workerbee-${{ github.ref_name }}.tgz" build - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - run: | + echo //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} >> .npmrc + ./scripts/publish_by_tag.sh 452 "${{ github.ref_name }}" "dist/hiveio-workerbee-${{ github.ref_name }}.tgz" build