GithubHelp home page GithubHelp logo

auto-release's Introduction

@junyiqin/auto-release

简介

在发布npm包或者一些符合npm规范的私有项目release时,需要手动键入一系列脚本来推送代码、标记git tag以及发布项目到npm或私有npm中,本工具做了这些动作的集成,是一个方便实用的轻量级release工具。

功能

  • 提供符合npm规范的版本号,支持major,minor,patch,premajor,preminor,prepatch,prerelease七种类型release版本号可选
  • 自动更新包版本号、changelog(依赖conventional-changelog)
  • 支持可选是否发布前构建,若需要请在使用方项目package.json中提供build脚本
  • 自动合并代码至主分支
  • 自动标记git tag
  • 支持可选是否发布至npm

如何使用

安装

npm:

npm install @junyiqin/auto-release -D

yarn:

yarn add @junyiqin/auto-release -D

使用

import release from '@junyiqin/auto-release';

const currentVersion = '1.2.3'
release({ currentVersion });

参数

属性 简介 是否必填 类型 默认值
currentVersion 使用方项目当前版本号,e.g:1.2.3 string -
npmRegistry npm源地址 string -
npmAuthToken npm login authtToken,可在.npmrc中查看获取 string -
mainBranch 使用方项目git主分支 string master
needPublish 是否需要发布至npmRegistry对应的npm中 boolean false

注意:

  • 若需要发布至npm,npmRegistry、npmAuthToken、needPublish必填,且needPublish为true
  • 使用了authToken是避免输入账号密码登录npm

auto-release's People

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.