ci: move publish logic to sh file

This commit is contained in:
鲁树人 2024-09-24 22:04:45 +01:00
parent 6eda801b1c
commit 00eb6ac46e
2 changed files with 6 additions and 6 deletions

View File

@ -28,9 +28,4 @@ steps:
- pnpm i - pnpm i
- BUILD_SKIP_WASM_PACK=1 pnpm build - BUILD_SKIP_WASM_PACK=1 pnpm build
- pnpm pack - pnpm pack
- | - ./ci_publish.sh
if [ -n "${DRONE_TAG}" ]; then
./ci_publish.sh
else
echo "skip package publish"
fi

View File

@ -1,4 +1,9 @@
#!/bin/bash #!/bin/bash
if [[ -z "${DRONE_TAG}" ]]; then
echo "skip package publish"
exit 0
fi
echo '//git.unlock-music.dev/api/packages/um/npm/:_authToken=${NPM_TOKEN}' > $HOME/.npmrc echo '//git.unlock-music.dev/api/packages/um/npm/:_authToken=${NPM_TOKEN}' > $HOME/.npmrc
pnpm publish --access=public pnpm publish --access=public