0.1.8 • Published 1 month ago
@wx-sab/drone-deploy-plugin v0.1.8
@wx-sab/drone-deploy-plugin
前端项目发布插件
Features
使用
安装
pnpm add -D @wx-sab/drone-deploy-plugin
配置
自动读取 sab-deploy.config.ts
或者 sab-deploy.config.js
文件的配置
import { defineConfig } from '@wx-sab/drone-deploy-plugin'
export default defineConfig({
// 开发平台对应的项目名
projectName: string;
// 开发平台对应的应用名,默认取 package.json 的 name
appName: string;
// 需要自动发布的环境 Map, 分支 -> 环境
/** 如下:
* {
* dev: "dp-dev",
* qa: "dp-qa",
* release: "dp-pre"
* }
*/
autoReleaseEnvs: Record<string, string>;
// 发布的版本号,默认取 package.json的 version
version: string;
// 是否自动创建版本
autoCreateVersion: boolean;
// 当前的分支
branch: string;
// 开发平台的账号密码
accountId: string;
password: string;
})
指令
校验版本
npx sab-deploy version-check --branch ${DRONE_BRANCH}
发布版本
npx sab-deploy release --branch ${DRONE_BRANCH}