githubrelease
CLI tool for GitHub release management
Last updated 2 years ago by psyrendust .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install githubrelease 
SYNC missed versions from official npm registry.

githubrelease

CLI tool for GitHub release management.

What does this do?

  1. pull from remote origin for master and develop branches
  2. rebase master onto develop
  3. rebase develop onto master
  4. grabs the short SHA of master
  5. updates changelog
  6. bumps version number
  7. commits changes
  8. creates a version tag
  9. pushes master and tag to remote
  10. rebase master onto develop
  11. pushes develop to remote
  12. creates a release on github
  13. output message "Landed in <shortsha>"

Setup

Install

To install from npm:

npm install -g githubrelease

To install from GitHub:

npm install -g psyrendust/githubrelease

Prerequisites

The githubrelease cli uses conventional-github-releaser under the hood, which needs the following in order to work:

  1. Setup a new GitHub app token
  2. Set your environment variable CONVENTIONAL_GITHUB_RELEASER_TOKEN to the token you just created

You can find more details here: Setup token for cli.

Usage

Flag options

  • -h: Show this message.
  • -v: Display the version of this script.
  • -f: Display the flags used when showing config.
  • -l: Generate a changelog entry and save it to <changelog>.
  • -p: Push <master>, <develop>, and tags to <remote>.
  • -u: Update <master> and <develop> branches from <remote> using rebase.
  • -n: Do not display any prompts.
  • -t: Do not trash the node_modules folder before running npm run test.
  • -T: Do not create a git tag and do no run conventionalGithubReleaser.

Argument options

  • -c: Location of the <changelog>. Defaults to CHANGELOG.md.
  • -C: The NPM client to use. Defaults to npm.
  • -m: The <master> branch. Defaults to master.
  • -d: The <develop> branch. Defaults to develop.
  • -r: The <remote> push and pull from. Defaults to origin.
  • -P: The preset style used to generate the changelog. Examples include [angular | jquery ...]. Defaults to conventional-recommended-bump.
  • -s: Allows you to start at a specific step. Useful for when the script fails before completing all steps. See Available steps below.
  • -b: The semver you would like to use for the release (default: patch). Can be: [ major | minor | patch | v0.0.0 ]

Available steps

  1. Update <master> and <develop> branches from <remote> using rebase.
  2. Push <master>, <develop>, and tags to <remote>.
  3. Run npm test
  4. Rebase <develop> onto <master>.
  5. Make a copy of package.json to _package.json (also copy package-lock.json to _package-lock.json if it exists).
  6. Temporarily bump the semver of package.json.
  7. Save a changelog entry to <changelog>.
  8. Commit <changelog> update to Git.
  9. Reset package.json by moving _package.json to package.json (also reset _package-lock.json to package-lock.json if it exists).
  10. Run npm version command, which bumps package.json and creates a tag. No git tag will be created if -T is passed.
  11. Rebase <master> onto <develop>.
  12. Push <master>, <develop>, and tags to <remote>.
  13. Run conventional-github-releaser to create a release in GitHub.
  14. Output landed message which contains the short sha of HEAD.

Examples:

  1. Update all branches
  2. Push changes from all branches
  3. Cut a release
githubrelease -u
githubrelease -p
githubrelease -b patch
githubrelease -tTb minor

Or just do it all in one command.

githubrelease -b patch

Use yarn instead of npm:

githubrelease -b patch -C yarn

Current Tags

  • 1.0.3                                ...           latest (2 years ago)

17 Versions

  • 1.0.3                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
  • 0.5.3                                ...           3 years ago
  • 0.5.2                                ...           3 years ago
  • 0.5.1                                ...           3 years ago
  • 0.5.0                                ...           3 years ago
  • 0.4.3                                ...           3 years ago
  • 0.4.2                                ...           4 years ago
  • 0.4.1                                ...           4 years ago
  • 0.4.0                                ...           4 years ago
  • 0.3.0                                ...           4 years ago
  • 0.2.2                                ...           4 years ago
  • 0.2.1                                ...           4 years ago
  • 0.2.0                                ...           4 years ago
  • 0.1.3                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |