Skip to content

Release Authentication Check #3

Release Authentication Check

Release Authentication Check #3

name: Release Authentication Check
on:
workflow_dispatch:
permissions:
contents: read
jobs:
npm-auth:
runs-on: ubuntu-latest
steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
registry-url: https://registry.npmjs.org
- name: Verify npm publish authentication
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
if [ -z "${NODE_AUTH_TOKEN:-}" ]; then
echo "::error::NPM_TOKEN is not available to this repository."
exit 2
fi
npm whoami --registry=https://registry.npmjs.org/