-
Notifications
You must be signed in to change notification settings - Fork 60
Component release management
This is our official process for releasing new versions of @code.gov/*
components:
-
code-gov-about-page
-
code-gov-api-client
-
cautious
-
code-gov-font
-
code-gov-style
-
compliance-dashboard-web-component
-
code-gov-fscp-react-component
-
json-schema-validator-web-component
-
json-schema-web-component
-
code-gov-site-map-generator
code-gov-front-end
consumes all of these @code.gov/*
packages through npm. Therefore, any component package that is updated between releases of code-gov-front-end
must also be released, published to npm, and updated in the package.json of code-gov-front-end
before deploying and publishing a new version of code-gov-front-end
.
See Version Control for more information about semantic versioning and what constitutes a release
See Git Workflow for more information about how to create new branches and suggest changes to @code.gov/*
repositories
{{ version }}
should always be replaced with the semantic version number, i.e. 1.2.1
Before you get started, close all running processes in the terminal.
-
Determine if the version is a patch (
#.#.#
), minor (#.#.0
), or major (#.0.0
) version -
Branch off master and use the branch name format
release-{{ version }}
:git pull origin master git checkout -b release-{{ version }} origin/master
Example > git checkout -b release-0.0.7 origin/master
npm version
will increment the version number semantically in package.json
and commit the changes to git. Versions will be tagged on the master branch. See the npm publish
documentation for additional options.
- For prerelease releases: Run
npm version prerelease --no-tag
. - For patch releases: Run
npm version patch --no-tag
. - For minor releases: Run
npm version minor --no-tag
. - For major releases: Run
npm version major --no-tag
.
This bumps the version number in package.json
and commits that change. It should echo back the new version number to your terminal command line. git log
should show that new commit.
- Push the version branch up to GitHub
- Merge
release-{{ version }}
back in to themaster
branch - Run
git checkout master
andgit pull origin master
to update your local repository - Run
npm publish
to release the package to the npm directory - Check that the new release was published to npm
If you get the following error then run npm login
to authenticate to npm.
npm ERR! publish Failed PUT 401
npm ERR! code E401
npm ERR! You must be logged in to publish packages.
- On the releases page for the repository on GitHub.com, select the release draft notes you had previously started or
Draft a new release
- Add the
tag
:v{{ version }}
- Use
target
:master
- For any release of
code-gov-style
or major releases of another component, add release notes to the body and have at least one team member review the release notes - Select
Publish release
- Create a new branch of
code-gov-front-end
following our Git Workflow - Open the package.json of
code-gov-front-end
- Update the version number of the package(s) you just published to npm and GitHub
- Commit the changes and make a PR to master to update
code-gov-front-end
before the next deployment of the front end