Skip to content

Commit 42fc2aa

Browse files
Fix auth on npm publish (redhat-developer#1100)
* check NODE_AUTH_TOKEN is available or not Signed-off-by: msivasubramaniaan <msivasub@redhat.com> * set NODE_AUTH_TOKEN * set npmAuthToken $NODE_AUTH_TOKEN * set npmAuthToken $NODE_AUTH_TOKEN --------- Signed-off-by: msivasubramaniaan <msivasub@redhat.com>
1 parent c75f4cc commit 42fc2aa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/CI.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ jobs:
7575

7676
- name: Publish
7777
if: ${{ success() && runner.os == 'Linux' && github.event_name == 'push' && github.ref == 'refs/heads/main'}}
78-
run: yarn publish --tag next --no-git-tag-version --prepatch --preid "$(git rev-parse --short HEAD)"
78+
run: |
79+
yarn config set npmAuthToken $NODE_AUTH_TOKEN
80+
yarn publish --tag next --no-git-tag-version --prepatch --preid "$(git rev-parse --short HEAD)"
7981
env:
8082
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
8183

0 commit comments

Comments
 (0)