Skip to content

Release Process

Ryan Johnson edited this page Apr 24, 2018 · 17 revisions
Audience
Contributors

TL;DR

  1. rm -rf dist/
  2. git checkout -t -b release-{versionnumber}
  3. npm version {keyword}
  4. git commit --amend
  5. npm publish
  6. npm run ghpages
  7. Submit PR against master

Cleanup Dist/

npm will package up everything in dist/ and publish to npmjs.org, so you want to make sure that it's as clean as possible. To do this, just remove the directory and prepublish will handle recompiling before things get sent to NPM.

Checkout Temporary Release Branch

Given that the tasks will update package.json, we want to make sure we stick to a feature branch workflow so that we can merge the version changes back into master. The name of this branch doesn't matter, but a good pattern to follow is...

git checkout master
git checkout -t -b release-{VERSION}

Bump Version

npm already has logic built-in to bump the version number. Run npm help version for more information.

WARNING: npm currently does not have a dry run option. Start with premajor, preminor, or prepatch to make sure everything is running smoothly before you publish.

npm version (major | minor | patch | premajor | preminor | prepatch | prerelease)

Version Example

Say we're currently at 0.0.1 of HelixUI.

npm version prepatch   # 0.0.2-0
npm version prerelease # 0.0.2-1
npm version patch      # 0.0.2

npm version preminor   # 0.1.0-0
npm version prerelease # 0.1.0-1
npm version minor      # 0.1.0

npm version premajor   # 1.0.0-0
npm version prerelease # 1.0.0-1
npm version major      # 1.0.0

Publish Distributable Assets to NPM

Prerequisites:

  • Requires logging into npm (npm login) with helix-ui credentials (ask HelixUI dev for details)
  • npm whoami should return "helix-ui"

Publishing:

npm publish

Publish Documentation

Documentation is published separately from npm assets. This command can be run independently of the above steps to push updated documentation without the need to publish new NPM assets.

npm run ghpages

Modify Default Version Bump Commit

The default commit message used by npm version is lacking. It doesn't follow our commit message format, and it will also trigger a TravisCI build on push to origin.

  • git commit --amend
  • message should follow format: chore(release): vX.Y.Z [skip ci]
Clone this wiki locally