@wx-sab/drone-deploy-plugin
TypeScript icon, indicating that this package has built-in type declarations

0.1.8 • Public • Published

@wx-sab/drone-deploy-plugin

前端项目发布插件

Features

[x] 自动创建版本 [x] 自动发布对应环境

使用

安装

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}

Readme

Keywords

none

Package Sidebar

Install

npm i @wx-sab/drone-deploy-plugin

Weekly Downloads

1

Version

0.1.8

License

ISC

Unpacked Size

38.1 kB

Total Files

36

Last publish

Collaborators

  • zprial