CI: Build and publish #7
15
.drone.yml
15
.drone.yml
@ -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
|
||||
|
4
um_wasm_loader/ci_publish.sh
Normal file
4
um_wasm_loader/ci_publish.sh
Normal 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
|
Loading…
Reference in New Issue
Block a user