-
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]
). -
Update
CHANGELOG.md
"Unreleased" heading with the new version number. This should be incremented based on Semantic versioning from the unreleased changes listed.
Copy the CHANGELOG_TEMPLATE.md
, above the new release to make it easy for new contributors.
-
Update
package/package.json
version with the new version number. This should be incremented based on Semantic versioning from the unreleased changes listed. -
Save the changes. Do not commit.
-
Run
npm run pre-release
.
This will:
- copy files from
src/
topackage/
and run tests - add vendor prefixes to CSS in
package/
- build "govuk-frontend" Sass and JavaScript files into
dist/
- commit all changes and push the branch to remote
- (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
.
This will:
- check that you're logged in to npm as the correct user.
- publish the package has not been published yet
- create a new tag if the current git tag does not match the latest published tag
- push the tag to remote origin
- create a zip file of the
dist
directory
- 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 Trello cards from "Next Frontend release" column to "Done".
-
Add Trello cards to "This Sprint" column for
- Update the GOV.UK Design System to use the latest release
- Update the GOV.UK Prototype Kit to use the latest release