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

Release infra #1431

Merged
merged 18 commits into from
May 17, 2023
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
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
/packages/hbs-loader/**/*.d.ts
/test-packages/support/**/*.js
/test-packages/**/*.d.ts
/test-packages/release/src/*.js
/test-packages/release/src/*.d.ts
/tests/scenarios/**/*.js
/tests/scenarios/**/*.d.ts
/packages/test-setup/**/*.js
Expand Down
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
/packages/hbs-loader/**/*.d.ts
/test-packages/support/**/*.js
/test-packages/**/*.d.ts
/test-packages/release/src/*.js
/test-packages/release/src/*.d.ts
/tests/scenarios/**/*.js
/tests/scenarios/**/*.d.ts
/packages/test-setup/**/*.js
Expand Down
31 changes: 16 additions & 15 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
# Release Process

Release process is currently switching from release-it to https://github.com/changesets/changesets
1. You need a github token as `GITHUB_AUTH` environment variable.

## Notes
2. Run `pnpm embroider-release explain-plan`. If there are unlabeled PRs that need to be released it will complain and show you a list of them. Each PR needs to be labeled with one of:
- breaking
- enhancement
- bug
- documentation
- internal

Used `changesets` to do release-2022-10-6.0. Didn't go smoothly.
3. Once all the PRs are labeled, it will instead show you the release plain, explaining which packages are getting released, at which versions, and why.

1. Generated a changeset file describing everything since last release.
4. If you disagree with the plan, you can modify the list of changes before using it to `explain-plan` or `prepare` a release:

Scan for which packages were touched so nothing gets missed:
- `pnpm embroider-release gather-changes > /tmp/changelog`
- edit `/tmp/changelog`
- `pnpm embroider-release explain-plan --from-stdin < /tmp/changelog`

git diff --stat v1.8.3..HEAD
For example, this can be necessary if a PR that's labeled `breaking` touches multiple packages and only one of those packages is actually a breaking change. In that case you can take the other package names out of the description of the PR.

Find all PRs since previous release to summarize them
5. Once you're happy with the plan, run `pnpm embroider-release prepare`. This will edit CHANGELOG.md, bump the version numbers in package.json files, and create a file named `.release-plan.json`. Make a PR with these changes.

git log v1.8.3..HEAD
6. Once the PR is merged, in a clean local repo at the merge commit, run `pnpm embroider-release publish`.

And search for "Merge pull"

2. Used `changeset version`, manually moved all readme content from changeset into our top-level readme (because the defaults in `changesets` want to create per-package ones).

3. Tried using `changeset publish` but that started publishing lots of unintended packages. Followed up by manually releasing the others.

4. Noticed that `changeset version` bumped a dependency version in `@embroider/util` but didn't bump `@embroider/util`'s version. Had to update and release it manually.

14 changes: 13 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
}
},
"devDependencies": {
"@embroider/release": "workspace:*",
"@types/jest": "^29.2.0",
"@typescript-eslint/eslint-plugin": "^5.59.5",
"@typescript-eslint/parser": "^5.59.5",
Expand All @@ -60,5 +61,16 @@
"node": "16.20.0",
"pnpm": "8.4.0"
},
"version": "1.8.3"
"changelog": {
"__comment__": "Our release infrastructure relies on these exact labels. Be careful changing them.",
"labels": {
"breaking": ":boom: Breaking Change",
"enhancement": ":rocket: Enhancement",
"bug": ":bug: Bug Fix",
"documentation": ":memo: Documentation",
"internal": ":house: Internal",
"unlabeled": ":question: Unlabeled"
},
"wildcardLabel": "unlabeled"
}
}
2 changes: 1 addition & 1 deletion packages/router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"typescript": "^4.9.0"
},
"peerDependencies": {
"@embroider/core": "workspace:^"
"@embroider/core": "workspace:^2.0.0||^3.0.0"
},
"peerDependenciesMeta": {
"@embroider/core": {
Expand Down
Loading