mirror of https://github.com/openclaw/openclaw.git
ci: add npm token fallback for npm releases
This commit is contained in:
parent
94a292686c
commit
bc3319207c
|
|
@ -69,8 +69,13 @@ jobs:
|
||||||
run: pnpm release:check
|
run: pnpm release:check
|
||||||
|
|
||||||
- name: Publish
|
- name: Publish
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
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")
|
PACKAGE_VERSION=$(node -p "require('./package.json').version")
|
||||||
|
|
||||||
if [[ "$PACKAGE_VERSION" == *-beta.* ]]; then
|
if [[ "$PACKAGE_VERSION" == *-beta.* ]]; then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue