Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve release steps #745

Merged
merged 5 commits into from
Jun 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ Note: We're not following semantic versioning yet, we are going to talk about th
- Fix review application templates to give them the correct HTML structure.
([PR #742](https://github.com/alphagov/govuk-frontend/pull/742))

- Improve release steps
([PR #745](https://github.com/alphagov/govuk-frontend/pull/745))

## 0.0.31-alpha (Breaking release)

💥 Breaking changes:
Expand Down
38 changes: 21 additions & 17 deletions docs/publishing.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,29 @@

1. Checkout **master** and pull latest changes.

2. Run `npm install` to ensure you have the latest dependencies installed.
2. Run `nvm use` to ensure you are using the right version of Node.js and npm.

3. Create and checkout a new branch (`release-[version-number]`).
3. Run `npm install` to ensure you have the latest dependencies installed.

4. Update [`CHANGELOG.md`](../CHANGELOG.md) "Unreleased" heading with the new version number.
4. Create and checkout a new branch (`release-[version-number]`).

5. Update [`CHANGELOG.md`](../CHANGELOG.md) "Unreleased" heading with the new version number.
This should be incremented based on [Semantic versioning](https://semver.org/) from the unreleased changes listed.

5. Update [`package/package.json`](../package/package.json) version with the new version number.
6. Update [`package/package.json`](../package/package.json) version with the new version number.
This should be incremented based on [Semantic versioning](https://semver.org/) from the unreleased changes listed.

6. Save the changes. Do not commit.
7. Save the changes. Do not commit.

7. Run `npm run pre-release`.
8. Run `npm run pre-release`.

This will:
- copy files from `src/` to `package/` and run tests
- add [vendor prefixes](https://github.com/postcss/autoprefixer) to CSS in `package/`
- build "govuk-frontend" Sass and JavaScript files into `dist/`
- commit all changes and push the branch to remote

8. (Optional) Test in [GOV.UK Design System](git@github.com:alphagov/govuk-design-system.git)
9. (Optional) Test in [GOV.UK Design System](git@github.com:alphagov/govuk-design-system.git)

If you want to test your changes work correctly when used in the GOV.UK Design System you can use [npm link](https://docs.npmjs.com/cli/link) to test before publishing.

Expand All @@ -39,16 +41,16 @@ This will:
npm unlink ../govuk-frontend/package/
```

9. Create a pull request and copy the changelog text.
10. 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.

10. Once the pull request is approved, merge to **master**.
11. Once the pull request is approved, merge to **master**.

11. Checkout **master** and pull the latest changes.
12. Checkout **master** and pull the latest changes.

12. Log into npm, using team [credentials](https://github.com/alphagov/design-system-team-credentials/tree/master/npm/govuk-patterns-and-tools).
13. Log into npm, using team [credentials](https://github.com/alphagov/design-system-team-credentials/tree/master/npm/govuk-patterns-and-tools).

13. Run `npm run release`.
14. Run `npm run release`.

This will:
- check that you're logged in to npm as the correct user.
Expand All @@ -57,19 +59,21 @@ This will:
- push the tag to remote origin
- create a zip file of the `dist` directory

14. Create a release in the [Github interface](https://github.com/alphagov/govuk-frontend/releases/new)
15. Create a release in the [Github interface](https://github.com/alphagov/govuk-frontend/releases/new)
- select the latest tag version
- set "GOV.UK Frontend release v[version-number]" as the title
- add release notes from changelog
- attach the generated ZIP that is located at the root of the project
- 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
- mark the release as a pre-release
- publish release

15. Log out from npm
16. Log out from npm
```bash
npm logout
```
16. Move Trello cards from "Next Frontend release" column to "Done".
17. Move Trello cards from "Next Frontend release" column to "Done".

17. Add Trello cards to "This Sprint" column for
18. 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
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.