mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-29 23:23:41 +00:00
ci: add npm token fallback for npm releases
This commit is contained in:
5
.github/workflows/openclaw-npm-release.yml
vendored
5
.github/workflows/openclaw-npm-release.yml
vendored
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user