Skip to content

Commit

Permalink
Address review suggestions
Browse files Browse the repository at this point in the history
Co-authored-by: Brett Kyle  <brett.kyle@digital.cabinet-office.gov.uk>
Co-authored-by: Colin Rotherham <colin.rotherham@digital.cabinet-office.gov.uk>
  • Loading branch information
3 people committed Nov 17, 2023
1 parent ccd0cca commit 98ce5b5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
21 changes: 10 additions & 11 deletions docs/releasing/publishing-a-pre-release.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Before you publish a pre-release of GOV.UK Frontend

Decide the kind of pre-release you're publishing. All pre-releases are public, but we distinguish:
Decide the kind of pre-release you're publishing. All pre-releases are public, but we distinguish between:

- `internal` pre-releases for internal use
- `beta` pre-releases aimed at external users
Expand All @@ -9,16 +9,15 @@ We'll use the kind of pre-release as [the pre-release identifier](https://docs.n

## If you're publishing a beta pre-release

Besides publishing the code itself, beta releases will likely involve
documentation updates linked to the code, as well as communications, similarly to an actual release.
Besides publishing the code itself, beta releases will likely involve code-related documentation updates and user communications, much like an actual release.

Review the docs for [what to do before publishing a release](/docs/releasing/before-publishing-a-release.md) to assess which steps you need to follow for your specific pre-release and ensure you are prepared to publish.

See the [documentation on support branches](https://govuk-design-system-team-docs.netlify.app/how-we-work/version-control/support-branches.html#support-branches) if you need to publish a new pre-release of previous major versions of GOV.UK Frontend.

# Publish a new version of GOV.UK Frontend

Developers should pair on pre-releases. When remote working, it can be useful to be on a call together.
Developers should pair on pre-releases. When working remotely, it can be useful to be on a call together.

1. Check out the **main** branch and pull the latest changes.

Expand All @@ -29,14 +28,14 @@ Developers should pair on pre-releases. When remote working, it can be useful to

3. Run `npm ci` to make sure you have the exact dependencies installed.

4. Determine the pre-release identifier
4. Determine the `< PRE_RELEASE_IDENTIFIER >`

- Use `internal` for internal pre-releases
- Use `beta` for beta pre-releases

5. Determine the pre-release version type
5. Determine the `< PRE_RELEASE_VERSION_TYPE >`

Given the `beta` pre-release identifier:
As examples with a `beta` pre-release identifier:

- Use `premajor` to bump from `v4.7.0` to `v5.0.0-beta.0`
- Use `preminor` to bump from `v4.7.0` to `v4.8.0-beta.0`
Expand All @@ -53,14 +52,14 @@ Developers should pair on pre-releases. When remote working, it can be useful to
6. Apply the new pre-release version number by running:

```shell
npm version <PRE-RELEASE TYPE> --preid <PRE-RELEASE IDENTIFIER> --no-git-tag-version --workspace govuk-frontend
npm version < PRE_RELEASE_VERSION_TYPE > --preid < PRE_RELEASE_IDENTIFIER > --no-git-tag-version --workspace govuk-frontend
```

This step will update [`govuk-frontend`'s `package.json`](/packages/govuk-frontend/package.json) and project [`package-lock.json`](/package-lock.json) files.
Do not commit the changes.
7. Create and check out a new branch (`release-[version-number]`)
7. Create and check out a new branch (`release-[version]`)
```shell
git switch -c "release-$(npm run version --silent --workspace govuk-frontend)"
Expand Down Expand Up @@ -109,7 +108,7 @@ Developers should pair on pre-releases. When remote working, it can be useful to
This step will create a ZIP file containing the release in the root of your govuk-frontend git directory. You will need this file when creating the GitHub release.
It will also automatically create a tag in GitHub which you can use to create a GitHub release in the following section.
This step will also automatically create a tag in GitHub which you can use to create a GitHub release in the following section.
6. Verify the presence of the pre-release and its tag on [npm](https://www.npmjs.com/package/govuk-frontend?activeTab=versions)
Expand All @@ -124,7 +123,7 @@ To create a new GitHub release, do the following:

1. Select the tag corresponding to the release in [the list of tags on GitHub](https://github.com/alphagov/govuk-frontend/tags)
2. Press **Create release from tag**
3. Set 'GOV.UK Frontend v[version-number]' as the title
3. Set 'GOV.UK Frontend v[version]' as the title
4. Add release notes from [`CHANGELOG.md`](/CHANGELOG.md)
5. Attach as release binary the ZIP file that has been generated at the root of this project during the npm publishing phase
6. [Select "This is a pre-release"](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository) to mark the release as a pre-release
Expand Down
8 changes: 4 additions & 4 deletions docs/releasing/publishing.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Developers should pair on releases. When remote working, it can be useful to be

3. Run `npm ci` to make sure you have the exact dependencies installed.

4. Pick a new version number according to the [versioning documentation](/docs/contributing/versioning.md) and apply it running:
4. Pick a new version number according to the [versioning documentation](/docs/contributing/versioning.md) and apply it by running:

```shell
npm version <NEW VERSION NUMBER> --no-git-tag-version --workspace govuk-frontend
Expand All @@ -30,7 +30,7 @@ Developers should pair on releases. When remote working, it can be useful to be
Do not commit the changes.
5. Create and check out a new branch (`release-[version-number]`)
5. Create and check out a new branch (`release-[version]`)
```shell
git switch -c "release-$(npm run version --silent --workspace govuk-frontend)"
Expand Down Expand Up @@ -73,7 +73,7 @@ Developers should pair on releases. When remote working, it can be useful to be

This step will create a ZIP file containing the release in the root of your govuk-frontend git directory. You will need this file when creating the GitHub release.

It will also automatically create a tag in Github which you can use to create a Github release in the following section.
This step will also automatically create a tag in Github which you can use to create a Github release in the following section.

6. Verify the presence of the pre-release and its tag on [npm](https://www.npmjs.com/package/govuk-frontend?activeTab=versions)

Expand All @@ -88,7 +88,7 @@ To create a new GitHub release, do the following:
1. Select the tag corresponding to the release in [the list of tags on GitHub](https://github.com/alphagov/govuk-frontend/tags)
2. Press **Create release from tag**
3. Set 'GOV.UK Frontend v[version-number]' as the title
3. Set 'GOV.UK Frontend v[version]' as the title
4. Add release notes from [`CHANGELOG.md`](/CHANGELOG.md)
5. Attach as release binary the ZIP file that has been generated at the root of this project during the npm publishing phase
6. Publish release
Expand Down

0 comments on commit 98ce5b5

Please sign in to comment.