ci: add npm token fallback for npm releases

This commit is contained in:
Peter Steinberger 2026-03-14 05:08:19 +00:00
parent 94a292686c
commit bc3319207c
No known key found for this signature in database
1 changed files with 5 additions and 0 deletions

View File

@ -69,8 +69,13 @@ jobs:
run: pnpm release:check
- name: Publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
set -euo pipefail
if [[ -n "${NODE_AUTH_TOKEN:-}" ]]; then
printf '//registry.npmjs.org/:_authToken=%s\n' "$NODE_AUTH_TOKEN" > "$HOME/.npmrc"
fi
PACKAGE_VERSION=$(node -p "require('./package.json').version")
if [[ "$PACKAGE_VERSION" == *-beta.* ]]; then