Socket
Socket
Sign inDemoInstall

mcfly-semantic-release

Package Overview
Dependencies
413
Maintainers
3
Versions
31
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    mcfly-semantic-release

A cli tool to bump version and publish to github


Version published
Maintainers
3
Install size
30.8 MB
Created

Readme

Source

mcfly-semantic-release

NPM version Downloads
Build Status Coverage percentage
Dependency Status Dependency Dev Status

NPM

Installation

npm i --save-dev mcfly-semantic-release

Usage

In your package.json

"scripts": {
  "release": "mcfly-semantic-release"
}

Running release will do the following:

  • Bumps version. By default, this will publish a patch version, if you want to control the semver option you can pass an optional type --type argument. The prerelease versions will be in the format of 2.3.2-4. valid types are: 'major', 'minor', 'patch', 'premajor', 'preminor', 'prepatch', 'prerelease'
  • Updates version in files: by default it will only update the root level package.json. Optionnaly use --file to specify file paths or files patterns (globs) that can have their version updated as well. Files can be package.json files or config.xml files
  • Commit the changed files with a standard commit message. Default message is chore(app): Version <version number>. Use --production to suffix the commit message with the work production (can be later used in CI)
  • Generates changlog based on Angular standard commit messages.
  • Generate a tag with the version number.
  • Generates a github release with the version number.
"scripts": {
  "release": "mcfly-semantic-release.js --files ./package.json ./bower.json ./config.xml ./projects/**/package.json"
}

NOTE
the path for the --files option is relative to your current root directory

Then, to publish a new version execute the following command:

npm run release

Example :

npm run release -- --type=minor

NOTE
The double -- is necessary, this is how npm script propagates its arguments

Alternate github authentication methods

By default mcfly-semantic-release uses basic username & password auth to communicate with github. Whem it runs, you will be prompted for your github username and password before the release will run. If your username for github is available in your git config, mcfly-semantic-release will find it and not prompt you to enter it.

As an alternative to basic auth, you can provide an oauth token (see github oauth). To use a token, make sure it is valid and has the correct scopes for the repo and then pass it as $GITHUB_TOKEN. Then, when prompted for your password, just leave it blank and hit enter and the token will be used for the authentication!

~/dev/mcfly-io/mcfly-semantic-release $> GITHUB_TOKEN=<oauth_token> npm run release

> mcfly-semantic-release@1.0.15 release /Users/marty/dev/mcfly-io/mcfly-semantic-release
> node bin/mcfly-semantic-release.js

Hello marty@mcfly.io, let's publish a new version...
? Please enter your GitHub password (leave blank to use $GITHUB_TOKEN)
Github authentication...
Generating changelog...
Bumping files...
Committing version...
Publishing version...
Release v1.0.16 successfully published!

FAQs

Last updated on 10 Jun 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc