-
Checkout master and pull latest changes.
-
Run
nvm use
to ensure you are using the right version of Node.js and npm. -
Run
npm install
to ensure you have the latest dependencies installed. -
Create and checkout a new branch (
release-[version-number]
). The version number is determined by looking at the current "Unreleased" CHANGELOG changes and updating the previous release number depending on the kind of entries:
Breaking changes
corresponds to amajor
(1.X.X) change.New features
corresponds to aminor
(X.1.X) change.Fixes
corresponds to apatch
(X.X.1) change.
For example if the previous version is 2.3.0
and there are entries for Breaking changes
then the new release should be 3.0.0
.
See the versioning documentation for more information.
-
Update
CHANGELOG.md
"Unreleased" heading with the new version number. Copy theCHANGELOG_TEMPLATE.md
, above the new release to make it easy for new contributors. -
Update
package/package.json
version with the new version number. -
Save the changes. Do not commit.
-
Run
npm run pre-release
, you will be prompted to continue or cancel. -
(Optional) Test in GOV.UK Design System
If you want to test your changes work correctly when used in the GOV.UK Design System you can use npm link to test before publishing.
cd ../govuk-design-system
git checkout master
git pull
npm install # note running `npm install` after `npm link` will destroy the link.
npm link ../govuk-frontend/package/
When you have finished you need to unlink the package
npm unlink ../govuk-frontend/package/
-
Create a pull request and copy the changelog text. When reviewing the PR, check that the version numbers have been updated and that the compiled assets use this version number.
-
Once the pull request is approved, merge to master.
-
Checkout master and pull the latest changes.
-
Log into npm, using team credentials.
-
Run
npm run release
, you will be prompted to continue or cancel. -
Create a release in the Github interface
- select the latest tag version
- set "GOV.UK Frontend release v[version-number]" as the title
- add release notes from changelog
- add a summary of highlights (this will be used when sending comms out)
- attach the generated ZIP that has been generated at the root of the project
- publish release
- Log out from npm
npm logout
-
Send a message to our users in both the X-GOV and GDS #govuk-design-system slack channels that indicates there's a new release with a short summary.
-
Move cards on the Sprint board from "Ready to Release" column to "Done".
-
Add cards to the "Backlog" column:
- Update the GOV.UK Design System to use the latest release
- Update the GOV.UK Prototype Kit to use the latest release