Release Process - HelixDesignSystem/helix-ui GitHub Wiki


Preparation

Stop Local Dev Servers

Stop all yarn start or yarn serve commands.

Update working copy to latest changes in master

To release the latest code, you'll need the latest code 😄.

git checkout master
git pull

Clean up generated assets

To ensure a clean release, you'll want to make sure that generated assets are created as cleanly as possible.

  • The npm publish command will package up everything in dist/ and publish to NPM.
  • The npm run ghpages command will push files in public/.
# Clean up generated files
rm -rf dist public _tmp

The prepublish script will handle recompiling assets before things get sent to NPM.

Install fresh dependencies

Development dependencies should be reinstalled to minimize the chances for unexpected errors.

yarn install:clean

Releasing to NPM

Prerequisites

Public NPM Registry

The npm get registry command should respond with the public NPM registry (https://registry.npmjs.org/ at the time of writing this document).

$ npm get registry
https://registry.npmjs.org/

This should be handled by the project .npmrc configuration, but different versions of the npm command may respond differently.

NPM Authentication

The npm whoami command should respond with "helix-ui".

$ npm whoami
helix-ui

If npm whoami returns a different value or no value, STOP!

Ask a HelixUI dev for help, before you continue.

1. Create Release Branch

Given that the release 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 it does need to be based off master.

A good naming convention to follow is release-{VERSION} (e.g., release-v0.16.1)

git checkout -t -b release-{VERSION}

2. 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-rc.0
npm version prerelease # 0.0.2-rc.1
npm version patch      # 0.0.2

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

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

3. Publish Assets

NOTE: This step requires npm whoami to be set up correctly.

To publish new assets to NPM, just run:

npm publish

Verify via Browser

Check the version displayed for the helix-ui package on npmjs.com.

Verify via CLI

Check the output of:

npm view helix-ui version versions

4. Update Master

Because npm version uses and modifies package.json, you'll need to merge changes back into master so that future releases will start with the correct version.

  1. Push your branch to github
  2. Submit a PR against the master branch
  3. Merge the PR
  4. Delete version branch

Publishing Documentation

Documentation is published separately from npm assets. This process can be run independently of the release to push updated documentation without the need to release new NPM assets.

There are two types of documentation:

  1. Production Docs
  2. Pre-release Docs

Production Docs

Documentation for functionality that is available on NPM.

URL: https://helixdesignsystem.github.io/helix-ui/

Steps

1. Update working copy to latest changes in master

Publish the latest docs, you'll need the latest code.

git checkout master
git pull

2. Publish to GitHub

npm run ghpages

Pre-Release Documentation

Documentation for functionality that is not yet available on NPM.

URL: https://helix-ui.netlify.com

Steps

  1. Log in to https://app.netlify.com/
  2. Open the "helix-ui" site
  3. Navigate to "Deploys"
  4. From the "Trigger Deploy" dropdown menu, click "Deploy Site".
  5. Wait for Netlify to report status