Skip to content

Commit

Permalink
Update pre-release and release docs after v5.0.0-beta.1 pre-release
Browse files Browse the repository at this point in the history
- Clarifies a couple of instructions
- Harmonises the capitalisation of GitHub
- Add link to CHANGELOG.md when needing to make the release notes
- Address concern that 'Given the `beta` pre-release identifier` could be interpreted as applying only to beta pre-releases
  • Loading branch information
romaricpascal committed Nov 3, 2023
1 parent f3f7e6d commit 478ed2d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
21 changes: 14 additions & 7 deletions docs/releasing/publishing-a-pre-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Developers should pair on pre-releases. When remote working, it can be useful to

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 Down Expand Up @@ -89,6 +89,13 @@ Developers should pair on pre-releases. When remote working, it can be useful to
1. Check out the **main** branch and pull the latest changes.
If there was an interruption between the raising of the PR and its merge,
or it's another developer running the publication to npm, rebuild the package with:

```shell
npm run build:package
```

2. Sign in to npm (`npm login`), using the credentials for the govuk-patterns-and-tools npm user from Bitwarden.

3. Run `npm run publish-release`, which will prompt you to check whether the npm tag looks as expected.
Expand All @@ -102,7 +109,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.
It 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 @@ -111,15 +118,15 @@ Developers should pair on pre-releases. When remote working, it can be useful to
7. Run `npm logout` to log out from npm. If you've logged in through your browser, remember to log out from <https://npmjs.com> there as well.

## If publishing a beta pre-release, create a release on Github
## If publishing a beta pre-release, create a release on GitHub

You can view the tag created during step 10 of creating the new version in the [Github interface](https://github.com/alphagov/govuk-frontend/tags). To create a new Github release, do the following:
To create a new GitHub release, do the following:

1. Select the latest tag
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
4. Add release notes from changelog
5. Attach the ZIP file that has been generated at the root of this project during the npm publishing phase
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
7. Publish 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 @@ -84,13 +84,13 @@ Developers should pair on releases. When remote working, it can be useful to be
## Create a release on Github
You can view the tag created during step 10 of creating the new version in the [Github interface](https://github.com/alphagov/govuk-frontend/tags). To create a new Github release, do the following:
To create a new GitHub release, do the following:
1. Select the latest tag
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
4. Add release notes from changelog
5. Attach the ZIP file that has been generated at the root of this project during the npm publishing phase
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
# After you publish the new release
Expand Down

0 comments on commit 478ed2d

Please sign in to comment.