File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,8 @@ name: Check NPM Publish Permissions
22
33on :
44 push :
5-
5+ env :
6+ NPM_TOKEN : " foo"
67jobs :
78 build :
89 runs-on : ubuntu-latest
@@ -18,22 +19,19 @@ jobs:
1819
1920 - name : Check NPM Authentication
2021 run : |
21- curl -H "Authorization: Bearer ${{ secrets.NPM_TOKEN}}" https://registry.npmjs.org/-/whoami || echo "Authentication failed"
22+ curl -H "Authorization: Bearer ${{ secrets.NPM_TOKEN}}" https://registry.npmjs.org/-/whoami
2223
2324 - name : Configure npm authentication
2425 run : |
2526 echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
2627
27- - name : Check NPM Authentication
28- run : |
29- curl -H "Authorization: Bearer ${{ secrets.NPM_TOKEN}}" https://registry.npmjs.org/-/whoami || echo "Authentication failed"
30-
31-
32- - run : npm whoami
28+ - name : Print NPM_TOKEN
29+ run : echo ${{ secrets.NPM_TOKEN }}
3330
3431 - name : List Packages I can access
3532 run : |
3633 npm access list packages
3734
35+ - run : npm whoami
3836
3937
You can’t perform that action at this time.
0 commit comments