2023-06-09 00:01:41 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: default
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: test & build
|
2024-12-14 18:57:00 +00:00
|
|
|
image: node:22.12.0-bookworm
|
2023-06-09 00:01:41 +00:00
|
|
|
commands:
|
2023-06-10 20:49:00 +00:00
|
|
|
# - git config --global --add safe.directory "/drone/src"
|
|
|
|
- corepack enable
|
|
|
|
- corepack prepare pnpm@latest --activate
|
2023-06-10 16:02:36 +00:00
|
|
|
- pnpm i --frozen-lockfile
|
|
|
|
- pnpm build
|
2023-06-10 17:00:31 +00:00
|
|
|
environment:
|
2023-06-10 17:05:50 +00:00
|
|
|
# 让 npm 使用淘宝源
|
2023-06-10 17:00:31 +00:00
|
|
|
npm_config_registry: https://registry.npmmirror.com
|
2023-06-09 00:01:41 +00:00
|
|
|
|
|
|
|
- name: publish
|
2024-12-14 18:57:00 +00:00
|
|
|
image: node:22.12.0-bookworm
|
2023-06-09 00:01:41 +00:00
|
|
|
environment:
|
|
|
|
DRONE_GITEA_SERVER: https://git.unlock-music.dev
|
|
|
|
GITEA_API_KEY:
|
|
|
|
from_secret: GITEA_API_KEY
|
|
|
|
NETLIFY_SITE_ID:
|
|
|
|
from_secret: NETLIFY_SITE_ID
|
|
|
|
NETLIFY_API_KEY:
|
|
|
|
from_secret: NETLIFY_API_KEY
|
|
|
|
commands:
|
2024-01-18 00:29:37 +00:00
|
|
|
- |
|
|
|
|
python3 -m zipfile -c um-react.zip dist/.
|
2024-09-12 22:26:18 +00:00
|
|
|
cp um-react.zip dist/"release-${DRONE_COMMIT_SHA}.zip"
|
2024-01-18 00:29:37 +00:00
|
|
|
python3 -m zipfile -c um-react-site.zip dist/.
|
2024-09-12 22:26:18 +00:00
|
|
|
- ./scripts/publish.sh
|
2023-06-09 00:01:41 +00:00
|
|
|
- ./scripts/deploy.sh
|