Skip to content

Commit b444e67

Browse files
committed
wip
1 parent f734e69 commit b444e67

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

.github/workflows/check-npm-token-permissions.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ name: Check NPM Publish Permissions
22

33
on:
44
push:
5-
5+
env:
6+
NPM_TOKEN: "foo"
67
jobs:
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

0 commit comments

Comments
 (0)