|
| 1 | +# Releases |
| 2 | + |
| 3 | +How Hoverboard is versioned and released, and what counts as a breaking change. |
| 4 | + |
| 5 | +## Versioning |
| 6 | + |
| 7 | +Hoverboard uses [semantic versioning](https://semver.org/). The whole repo has one version, kept in the root [package.json](../package.json) and tagged as `vX.Y.Z`. The packages in `packages/` are private and not published, so their own `version` fields are not release versions. |
| 8 | + |
| 9 | +A version describes the impact of an update on a site that runs Hoverboard. |
| 10 | + |
| 11 | +### Major: breaking changes |
| 12 | + |
| 13 | +Anything that makes an organizer change something to keep their site working after updating: |
| 14 | + |
| 15 | +- **Config.** Removing or renaming a key, changing its meaning or type, or adding a required key with no default. This covers `site.json`, the content files and `schemaVersion`. |
| 16 | +- **Content files.** Changing the location or format of `resources.json`, markdown pages, blog posts or images. |
| 17 | +- **Firestore data.** Renaming or removing a collection or field, changing a field's type, or adding a required field. |
| 18 | +- **Security rules.** Firestore or Storage rules that reject data or requests that were allowed before. |
| 19 | +- **Functions.** Removing or renaming a function, changing its trigger, or requiring a new secret, API or Firebase service. |
| 20 | +- **CLI.** Removing or renaming an `hbd` command or flag, or changing a default in a way that changes the result. |
| 21 | +- **Requirements.** Raising the minimum Node.js version in `engines`, requiring a different Firebase plan, or dropping a supported browser. |
| 22 | +- **URLs.** Removing or changing a route without a redirect, which breaks shared links and search results. |
| 23 | + |
| 24 | +### Minor: features |
| 25 | + |
| 26 | +New features, new optional config keys with defaults, new built-in themes, new locales, new `hbd` commands and flags, and deprecations. |
| 27 | + |
| 28 | +### Patch: fixes |
| 29 | + |
| 30 | +Bug fixes, security fixes, translation fixes, and dependency updates with no change in behavior. |
| 31 | + |
| 32 | +## Breaking changes |
| 33 | + |
| 34 | +Every breaking change must: |
| 35 | + |
| 36 | +- Use `!` in the pull request title, for example `feat(config)!: rename event.dates`. |
| 37 | +- Explain what organizers need to do in a `BREAKING CHANGE:` paragraph at the end of the pull request description. It becomes part of the release notes. |
| 38 | +- From v4 on, ship an `hbd upgrade` migration for config and Firestore data changes, with tests against the previous shape. |
| 39 | + |
| 40 | +When possible, deprecate first: keep the old behavior working in a minor release with a warning from the build or `hbd doctor`, then remove it in the next major. |
| 41 | + |
| 42 | +## Pull requests |
| 43 | + |
| 44 | +Pull requests are squash merged, and the title becomes the commit message. Titles follow [Conventional Commits](https://www.conventionalcommits.org/), which the [PR Title](../.github/workflows/pr-title.yaml) check enforces. |
| 45 | + |
| 46 | +| Type | Use for | In release notes | Version bump | |
| 47 | +| ---------- | --------------------------------------------- | ---------------- | ------------ | |
| 48 | +| `feat` | A new feature for organizers or attendees | Features | Minor | |
| 49 | +| `fix` | A bug fix | Bug Fixes | Patch | |
| 50 | +| `perf` | A performance improvement | Performance | Patch | |
| 51 | +| `revert` | Reverting an earlier change | Reverts | Patch | |
| 52 | +| `docs` | Documentation and tutorials | Documentation | None | |
| 53 | +| `refactor` | Code changes with no change in behavior | Hidden | None | |
| 54 | +| `test` | Tests only | Hidden | None | |
| 55 | +| `build` | Build tooling | Hidden | None | |
| 56 | +| `ci` | Workflows | Hidden | None | |
| 57 | +| `chore` | Everything else, including dependency updates | Hidden | None | |
| 58 | +| `style` | Formatting only | Hidden | None | |
| 59 | + |
| 60 | +Any type with `!` is a major bump. Scopes are optional. Use the package or area, for example `web`, `functions`, `cli`, `storage`, `config` or `deps`. |
| 61 | + |
| 62 | +Write titles for organizers reading the release notes: `fix(web): show session times in the event time zone`, not `fix: tz bug`. |
| 63 | + |
| 64 | +## Making a release |
| 65 | + |
| 66 | +[release-please](https://github.com/googleapis/release-please) runs on every push to `main` ([workflow](../.github/workflows/release-please.yaml), [config](../release-please-config.json)). It keeps one release pull request open that bumps the version and adds the new notes to [CHANGELOG.md](../CHANGELOG.md). Merging that pull request tags the release and publishes a GitHub release. |
| 67 | + |
| 68 | +- Merge the release pull request when the release is ready. There is no fixed schedule. Fixes should be released soon after they land. |
| 69 | +- Until v4 ships, `release-as` in the config pins the release pull request to `4.0.0`, so it collects the v4 notes as work lands. Remove `release-as` in the pull request that releases v4. |
| 70 | +- Pull requests created with the default `GITHUB_TOKEN` do not trigger other workflows. To run CI on the release pull request, add a `RELEASE_PLEASE_TOKEN` secret with a fine-grained token that can write contents and pull requests. |
| 71 | + |
| 72 | +Repository settings this process depends on: |
| 73 | + |
| 74 | +- Allow squash merging only, with the default commit message set to the pull request title and description. |
| 75 | +- Allow GitHub Actions to create and approve pull requests (Settings, Actions, General). |
| 76 | + |
| 77 | +## Supported versions |
| 78 | + |
| 79 | +Only the latest major version gets fixes. v3 ended at v3.1.0, and there will be no more 3.x releases. Pre-v4 sites relaunch on v4 and move their content over by hand. |
0 commit comments