CI: Build and publish #7

Merged
lsr merged 14 commits from temp/ci-work into main 2024-09-24 21:31:21 +00:00
2 changed files with 19 additions and 0 deletions
Showing only changes of commit 6eda801b1c - Show all commits

View File

@ -2,6 +2,12 @@ kind: pipeline
type: docker
name: default
when:
event:
- push
- pull_request
- tag
steps:
- name: build (rust)
@ -13,9 +19,18 @@ steps:
- name: build (node)
image: node:22.9-bookworm
environment:
NPM_TOKEN:
from_secret: NPM_TOKEN
commands:
- corepack enable
- cd um_wasm_loader
- 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

View File

@ -0,0 +1,4 @@
#!/bin/bash
echo '//git.unlock-music.dev/api/packages/um/npm/:_authToken=${NPM_TOKEN}' > $HOME/.npmrc
pnpm publish --access=public