githubrelease
v1.0.3
Published
CLI tool for GitHub release management
Downloads
81
Maintainers
Readme
githubrelease
CLI tool for GitHub release management.
What does this do?
- pull from remote origin for master and develop branches
- rebase master onto develop
- rebase develop onto master
- grabs the short SHA of master
- updates changelog
- bumps version number
- commits changes
- creates a version tag
- pushes master and tag to remote
- rebase master onto develop
- pushes develop to remote
- creates a release on github
- output message "Landed in "
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:
- Setup a new GitHub app token
- 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 thenode_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 toCHANGELOG.md
.-C
: The NPM client to use. Defaults tonpm
.-m
: The<master>
branch. Defaults tomaster
.-d
: The<develop>
branch. Defaults todevelop
.-r
: The<remote>
push and pull from. Defaults toorigin
.-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
- Update
<master>
and<develop>
branches from<remote>
using rebase. - Push
<master>
,<develop>
, and tags to<remote>
. - Run
npm test
- Rebase
<develop>
onto<master>
. - Make a copy of
package.json
to_package.json
(also copypackage-lock.json
to_package-lock.json
if it exists). - Temporarily bump the semver of
package.json
. - Save a changelog entry to
<changelog>
. - Commit
<changelog>
update to Git. - Reset
package.json
by moving_package.json
topackage.json
(also reset_package-lock.json
topackage-lock.json
if it exists). - Run
npm version
command, which bumpspackage.json
and creates a tag. No git tag will be created if-T
is passed. - Rebase
<master>
onto<develop>
. - Push
<master>
,<develop>
, and tags to<remote>
. - Run conventional-github-releaser to create a release in GitHub.
- Output landed message which contains the short sha of HEAD.
Examples:
- Update all branches
- Push changes from all branches
- 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