Skip to content

wip

wip #15

name: Check NPM Publish Permissions
on:
push:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
registry-url: "https://registry.npmjs.org"
- name: Check NPM Authentication
run: |
curl -H "Authorization: Bearer ${{ secrets.NPM_TOKEN}}" https://registry.npmjs.org/-/whoami || echo "Authentication failed"
- name: Configure npm authentication
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Check NPM Authentication
run: |
curl -H "Authorization: Bearer ${{ secrets.NPM_TOKEN}}" https://registry.npmjs.org/-/whoami || echo "Authentication failed"
- run: npm whoami
- name: List Packages I can access
run: |
npm access list packages