From e665d1d5bc324401e0cb572b4764ccfd4c149fce Mon Sep 17 00:00:00 2001 From: Zakary Timson Date: Fri, 15 Dec 2023 04:23:49 +0000 Subject: [PATCH] Update npm/publish/action.yaml --- npm/publish/action.yaml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/npm/publish/action.yaml b/npm/publish/action.yaml index 368d8d3..ad889af 100644 --- a/npm/publish/action.yaml +++ b/npm/publish/action.yaml @@ -26,18 +26,8 @@ inputs: runs: using: composite steps: - - name: Setup registry - run: | - if [ "${{github.ref_name}}" == "${{inputs.branch}}" ]; then - TRIMMED=$(echo "${{inputs.registry}}" | sed s%http:%% | sed s%https:%%) - echo "_authToken=${{inputs.token}}" > .npmrc - echo "registry=${{inputs.registry}}" >> .npmrc - npm publish - fi - shell: sh - - name: Publish if: ${{github.ref_name}} == ${{inputs.branch}} uses: docker://node with: - args: /bin/bash -c 'echo "_authToken=${{inputs.token}}" > .npmrc && echo "registry=${{inputs.registry}}" >> .npmrc && npm publish' + args: /bin/bash -c 'npm config set registry ${{inputs.registry}} && npm config set -- ${{inputs.registry}}:_authToken ${{inputs.token}} && npm publish'