govuk_publishing_components: Publishing to RubyGems
Before publishing a new version check the open and approved pull requests and reach out to the authors to see if you can get their work published in the same release.
You should also post a message to #govuk-frontenders
on slack to ask if anyone else has a change that they would like to be included in the new version.
-
Checkout main and pull latest changes.
-
Create and checkout a new branch (
release-[version-number]
). The version number is determined by looking at the current "Unreleased" changes in CHANGELOG 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 Semantic Versioning for more information.
-
Update
CHANGELOG.md
"Unreleased" heading with the new version number and review the latest commits to make sure the latest changes are correctly reflected in the CHANGELOG. -
Update
lib/govuk_publishing_components/version.rb
version with the new version number. -
Run
bundle install && yarn install
to ensure you have the latest dependencies installed. -
Commit changes. These should include updates in the following files:
-
Create a pull request and copy the changelog text for the current version in the pull request description.
-
Once the pull request is approved, merge into the
main
branch. This action will trigger the CI to publish the new version to RubyGems. A dependabot pull request will automatically be raised in frontend applications.
See an example pull request for publishing a new version to RubyGems.