Skip to content

Commit 7273682

Browse files
authored
Merge pull request #64 from ember-cli/release-document
Update the release document to match the ember-cli process
2 parents 815f61b + 7af249d commit 7273682

File tree

1 file changed

+120
-16
lines changed

1 file changed

+120
-16
lines changed

RELEASE.md

Lines changed: 120 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,131 @@
11
# Release Process
22

3-
Releases in this repo are mostly automated using [release-plan](https://github.com/embroider-build/release-plan/). Once you label all your PRs correctly (see below) you will have an automatically generated PR that updates your CHANGELOG.md file and a `.release-plan.json` that is used to prepare the release once the PR is merged.
3+
This blueprint follows the same channel-based release process as [`ember-cli`](https://github.com/ember-cli/ember-cli/):
44

5-
## Preparation
5+
* `release` - This branch represents the `latest` dist-tag on NPM
6+
* `beta` - This branch represents the `beta` dist-tag on NPM
7+
* `main` - The branch represents the `alpha` dist-tag on NPM
68

7-
Since the majority of the actual release process is automated, the remaining tasks before releasing are:
9+
Most changes to this repo should be made as a PR that targets the `main` branch and then makes their way through `beta` and `release` over the course of 12 weeks as part of the Ember release train. Generally speaking we do not backport functional changes to `beta` or `release` but we can if needs be.
810

9-
- correctly labeling **all** pull requests that have been merged since the last release
10-
- updating pull request titles so they make sense to our users
11+
This release process is managed by [release-plan](https://github.com/embroider-build/release-plan) which means that all changes should be made as a pull request to make sure it is captured in the changelog.
1112

12-
Some great information on why this is important can be found at [keepachangelog.com](https://keepachangelog.com/en/1.1.0/), but the overall
13-
guiding principle here is that changelogs are for humans, not machines.
13+
## Release process overview
1414

15-
When reviewing merged PR's the labels to be used are:
15+
During the release week each of the versions are effectively "promoted" i.e. the current `beta` version is released as `latest`, the current `alpha` version is released as `beta` and a **new** `alpha` version is created. This requires PRs to each of the active branches to update the `ember-source` version. Each of those PRs that update dependencies should be marked as `enhancement` if we are releasing a minor version.
1616

17-
- breaking - Used when the PR is considered a breaking change.
18-
- enhancement - Used when the PR adds a new feature or enhancement.
19-
- bug - Used when the PR fixes a bug included in a previous release.
20-
- documentation - Used when the PR adds or updates documentation.
21-
- internal - Internal changes or things that don't fit in any other category.
17+
The release process during release week should look like this:
2218

23-
**Note:** `release-plan` requires that **all** PRs are labeled. If a PR doesn't fit in a category it's fine to label it as `internal`
19+
- Wait for `ember-source` to be released first
20+
- Merge any outstanding `Prepare Alpha Release` branches
21+
- Do an intial stable release from the `release` branch
22+
- update the dependency on `ember-cli` to point at this release and go through the release process there
23+
- Merge `release` into `beta`
24+
- Do a `beta` release
25+
- Merge `beta` into `main`
26+
- Do an `alpha` release
2427

25-
## Release
28+
### Merge any outstanding `Prepare Alpha Release` branches
2629

27-
Once the prep work is completed, the actual release is straight forward: you just need to merge the open [Plan Release](https://github.com/ember-cli/ember-app-blueprint/pulls?q=is%3Apr+is%3Aopen+%22Prepare+Release%22+in%3Atitle) PR
30+
This makes sure that you are starting from a "clean slate" before doing any other releases. This will make each of the following steps easier to follow.
31+
32+
You can use [this saved search](https://github.com/ember-cli/ember-app-blueprint/pulls?q=is%3Apr+is%3Aopen+Prepare) to find any outstanding `Prepare Release` branches.
33+
34+
35+
### Initial Stable Release from the `release` branch
36+
37+
- fetch latest from origin `git fetch`
38+
- create a new branch to do the release e.g. `git checkout --no-track -b release-plan-6-4 origin/release`
39+
- note: branches named like `release-6-4` are used to manage LTS patch releases so we don't want to create a branch with that name at this time
40+
- Merge `origin/beta` into the release branch
41+
- `git merge origin/beta --no-ff`
42+
- **make sure to not update the .release-plan file** this should only ever be changed by the release-plan github scripts
43+
- **make sure to not update the .github/workflows/plan-stable-release.yml file** this should still plan a stable release
44+
- **make sure to not update the .github/workflows/publish-stable.yml file** this should still publish a stable release
45+
- **make sure to not update the CHANGELOG.md file** so as not to include the beta or alpha changelogs in the next release
46+
- make sure to not update the version in the package.json during this step, this will be release-plan's job
47+
- make sure to not add the `release-plan` config section to the package.json during this step. We are releasing a real release so we don't want to configure release-plan to do a pre-release.
48+
- Update blueprint dependencies to latest
49+
50+
```
51+
pnpm dlx update-blueprint-deps --filter ember-source --tag latest files/package.json
52+
```
53+
54+
- commit this update `git commit -am "update blueprint dependencies to latest"`
55+
- push and open a PR targeting `release` with a PR title like `Update all dependencies for 6.4 release`
56+
- mark this PR as an `enhancement` if it is a minor release
57+
- check that everything is ok (i.e. that CI has run correctly and that you have the changes you expect)
58+
- merge branch
59+
- check that the `Prepare Release` PR has been correctly opened by `release-plan`
60+
- Merge the `Prepare Release` branch when you are ready to release
61+
- Check the `Release Stable` GitHub action to make sure the release succeeded
62+
63+
### Beta release from the `beta` branch
64+
65+
- fetch latest from origin `git fetch`
66+
- create a new branch to merge `release` into `beta` e.g. `git checkout --no-track -b merge-release origin/beta`
67+
- merge release into this new branch e.g. `git merge origin/release --no-ff`
68+
- **make sure to not update the .release-plan file** this should only ever be changed by the release-plan github scripts
69+
- **make sure to not update any .github/workflows/plan-release.yml file** this should still plan a beta release
70+
- **make sure to not update any .github/workflows/publish.yml file** this should still publish a beta release
71+
- make sure to not update the version in the package.json during this step, that step comes later
72+
- make sure to not remove the `release-plan` config section of the the `package.json` during this step.
73+
- merge master into this new branch too e.g. `git merge origin/main --no-ff`
74+
- **make sure to not update the .release-plan file** this should only ever be changed by the release-plan github scripts
75+
- **make sure to not update the CHANGELOG.md file** in this step. It should match the changelog on `origin/release` at this stage.
76+
- update the alpha version in package.json to be a beta i.e. if the incoming merge is `"version": "6.6.0-alpha.3",` update it to `"version": "6.6.0-beta.0",`
77+
- make sure not to update the `release-plan` config in `package.json`
78+
- Update blueprint dependencies to beta
79+
80+
```
81+
pnpm dlx update-blueprint-deps --filter ember-source --tag beta files/package.json
82+
```
83+
84+
- commit this update `git commit -am "update blueprint dependencies to beta"`
85+
- push and open a PR targeting `beta` with a PR title like `Prepare 6.5-beta`
86+
- mark this PR as an `enchancement` if the next beta is a minor release
87+
- check that everything is ok i.e. CI passes
88+
- merge the `merge-release` branch into `beta` in GitHub
89+
- check that the `Prepare Beta Release` PR has been correctly opened by `release-plan`
90+
- note: the release-plan config will automatically make this version a pre-release
91+
- Merge the `Prepare Beta Release` when you are ready to release the next beta version
92+
- Check the `Release Beta` GitHub action to make sure the release succeeded
93+
94+
95+
### Alpha release from the `main` branch
96+
97+
- fetch latest from origin `git fetch`
98+
- create a new branch to merge `beta` into `main` e.g. `git checkout --no-track -b merge-beta origin/main`
99+
- merge beta into this new branch e.g. `git merge origin/beta --no-ff`
100+
- **make sure to not update the .release-plan file** this should only ever be changed by the release-plan github scripts
101+
- make sure to not update the `release-plan` config section to the `package.json` during this step.
102+
- **make sure to not update any .github/workflows/plan-alpha-release.yml file** this should still plan an alpha release
103+
- **make sure to not update any .github/workflows/publish-alpha.yml file** this should still publish an alpha release
104+
- manually update the version in package.json to be the next alpha.
105+
- e.g. if the current alpha is `"version": "6.6.0-alpha.3",` update it to be `"version": "6.7.0-alpha.0",`
106+
- commit this change to the version in package.json: `git commit -am "update to the next alpha version"`
107+
- Update blueprint dependencies to alpha
108+
109+
```
110+
pnpm dlx update-blueprint-deps --filter ember-source --tag alpha files/package.json
111+
```
112+
113+
- commit this update `git commit -am "update blueprint dependencies to alpha"`
114+
- push and open a PR targeting `main` with a PR title like `Prepare 6.6-alpha`
115+
- mark this PR as an `enchancement` if the next alpha is a minor release
116+
- check that everything is ok i.e. CI passes
117+
- merge the `merge-beta` branch into `main` in GitHub
118+
- check that the `Prepare Alpha Release` PR has been correctly opened by `release-plan`
119+
- Merge the `Prepare Alpha Release` when you are ready to release the next alpha version
120+
- Check the `Release Alpha` GitHub action to make sure the release succeeded
121+
122+
123+
## Changelog updates
124+
125+
`release-plan` is designed to automatically generate a Changelog that includes the titles of every PR that was merged since the last release. As we would like to make use of this auto-generated Changelog we need to make sure that PRs are named correctly and the Changelog included in the "Prepare Release" PRs are what we were expecting.
126+
127+
If you want to change the content of the Changelog then you should update the PR titles you want to update and re-run the `Prepare Release` CI job for that branch. If there are PRs that you would prefer to exclude from the changelog (such as the `merge-beta` or `merge-release` PRs) then you can add the `ignore` label to the PR and they will be removed from the changelog.
128+
129+
## Patch Releases
130+
131+
Now that we're using release-plan for all releases, patch releases have become super easy! Every time you merge a PR to any branch that is being released with `release-plan` a new `Prepare Release` PR will be created. When you merge this `Prepare Release` branch it will automatically release the new Patch version.

0 commit comments

Comments
 (0)