From 00eb6ac46ea9365a45a7b4352e6bdfde8f5fbfd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B2=81=E6=A0=91=E4=BA=BA?= Date: Tue, 24 Sep 2024 22:04:45 +0100 Subject: [PATCH] ci: move publish logic to sh file --- .drone.yml | 7 +------ um_wasm_loader/ci_publish.sh | 5 +++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.drone.yml b/.drone.yml index ba6dc6b..ec01a37 100644 --- a/.drone.yml +++ b/.drone.yml @@ -28,9 +28,4 @@ steps: - pnpm i - BUILD_SKIP_WASM_PACK=1 pnpm build - pnpm pack - - | - if [ -n "${DRONE_TAG}" ]; then - ./ci_publish.sh - else - echo "skip package publish" - fi + - ./ci_publish.sh diff --git a/um_wasm_loader/ci_publish.sh b/um_wasm_loader/ci_publish.sh index 6c4fea9..f988397 100644 --- a/um_wasm_loader/ci_publish.sh +++ b/um_wasm_loader/ci_publish.sh @@ -1,4 +1,9 @@ #!/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 pnpm publish --access=public