Skip to content

Commit d53417e

Browse files
committed
Merge remote-tracking branch 'origin/master' into merge-release
# Conflicts: # .release-plan.json # CHANGELOG.md # package.json # packages/addon-blueprint/package.json # packages/app-blueprint/files/package.json # packages/app-blueprint/package.json # packages/blueprint-blueprint/package.json # packages/blueprint-model/package.json # packages/blueprint-model/utilities/experiments.js # pnpm-lock.yaml # tests/fixtures/addon/defaults/package.json # tests/fixtures/addon/pnpm/package.json # tests/fixtures/addon/typescript/package.json # tests/fixtures/addon/yarn/package.json # tests/fixtures/app/defaults/package.json # tests/fixtures/app/embroider-no-ember-data/package.json # tests/fixtures/app/embroider-no-welcome/package.json # tests/fixtures/app/embroider-pnpm/package.json # tests/fixtures/app/embroider-yarn/package.json # tests/fixtures/app/embroider/package.json # tests/fixtures/app/no-ember-data/package.json # tests/fixtures/app/npm/package.json # tests/fixtures/app/pnpm/package.json # tests/fixtures/app/typescript-embroider-no-ember-data/package.json # tests/fixtures/app/typescript-embroider/package.json # tests/fixtures/app/typescript-no-ember-data/package.json # tests/fixtures/app/typescript/package.json # tests/fixtures/app/yarn/package.json
2 parents 4750d2c + 01a68b9 commit d53417e

26 files changed

Lines changed: 232 additions & 101 deletions

File tree

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
name: Plan Alpha Release
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
pull_request_target: # This workflow has permissions on the repo, do NOT run code from PRs in this workflow. See https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
9+
types:
10+
- labeled
11+
- unlabeled
12+
branches:
13+
- master
14+
15+
concurrency:
16+
group: plan-release # only the latest one of these should ever be running
17+
cancel-in-progress: true
18+
19+
jobs:
20+
is-this-a-release:
21+
name: "Is this a release?"
22+
runs-on: ubuntu-latest
23+
outputs:
24+
command: ${{ steps.check-release.outputs.command }}
25+
26+
steps:
27+
- uses: actions/checkout@v4
28+
with:
29+
fetch-depth: 2
30+
ref: 'master'
31+
# This will only cause the `is-this-a-release` job to have a "command" of `release`
32+
# when the .release-plan.json file was changed on the last commit.
33+
- id: check-release
34+
run: if git diff --name-only HEAD HEAD~1 | grep -w -q ".release-plan.json"; then echo "command=release"; fi >> $GITHUB_OUTPUT
35+
36+
create-prepare-release-pr:
37+
name: Create Prepare Release PR
38+
runs-on: ubuntu-latest
39+
timeout-minutes: 5
40+
needs: is-this-a-release
41+
permissions:
42+
contents: write
43+
issues: read
44+
pull-requests: write
45+
# only run on push event or workflow dispatch if plan wasn't updated (don't create a release plan when we're releasing)
46+
# only run on labeled event if the PR has already been merged
47+
if: ((github.event_name == 'push' || github.event_name == 'workflow_dispatch') && needs.is-this-a-release.outputs.command != 'release') || (github.event_name == 'pull_request_target' && github.event.pull_request.merged == true)
48+
49+
steps:
50+
- uses: actions/checkout@v4
51+
# We need to download lots of history so that
52+
# github-changelog can discover what's changed since the last release
53+
with:
54+
fetch-depth: 0
55+
ref: 'master'
56+
- uses: pnpm/action-setup@v4
57+
- uses: actions/setup-node@v4
58+
with:
59+
node-version: 20
60+
cache: pnpm
61+
- run: pnpm install --frozen-lockfile
62+
- name: "Generate Explanation and Prep Changelogs"
63+
id: explanation
64+
run: |
65+
set +e
66+
pnpm release-plan prepare 2> >(tee -a release-plan-stderr.txt >&2)
67+
68+
if [ $? -ne 0 ]; then
69+
release_plan_output=$(cat release-plan-stderr.txt)
70+
else
71+
release_plan_output=$(jq .description .release-plan.json -r)
72+
rm release-plan-stderr.txt
73+
74+
if [ $(jq '.solution | length' .release-plan.json) -eq 1 ]; then
75+
new_version=$(jq -r '.solution[].newVersion' .release-plan.json)
76+
echo "new_version=v$new_version" >> $GITHUB_OUTPUT
77+
fi
78+
fi
79+
echo 'text<<EOF' >> $GITHUB_OUTPUT
80+
echo "$release_plan_output" >> $GITHUB_OUTPUT
81+
echo 'EOF' >> $GITHUB_OUTPUT
82+
env:
83+
GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}
84+
85+
# this is needed because our fixtures are highly dependent on the exact version of ember-cli in the monorepo
86+
# and release-plan updates the version during the plan phase
87+
- name: "Update blueprint to use new ember-cli version"
88+
# if you're planning to test this locally and you're on a mac then you should use `gsed` because bsd sed has different
89+
# arguments. You can install gsed with `brew install gnu-sed`
90+
run: |
91+
sed -i 's/"ember-cli".*/"ember-cli": "~'$(jq -r .version package.json)'",/' packages/app-blueprint/files/package.json
92+
93+
- uses: peter-evans/create-pull-request@v7
94+
with:
95+
commit-message: "Prepare Alpha Release ${{ steps.explanation.outputs.new_version}} using 'release-plan'"
96+
labels: "internal"
97+
branch: releaseplan-preview
98+
title: Prepare Alpha Release ${{ steps.explanation.outputs.new_version }}
99+
# this doesn't use secrets.GITHUB_TOKEN because we want CI to run on the PR that it opens.
100+
# See: https://docs.github.com/en/actions/how-tos/security-for-github-actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow
101+
token: ${{ secrets.RELEASE_PLAN_GH_PAT }}
102+
body: |
103+
This PR is a preview of the release that [release-plan](https://github.com/embroider-build/release-plan) has prepared. To release you should just merge this PR 👍
104+
105+
-----------------------------------------
106+
107+
${{ steps.explanation.outputs.text }}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# For every push to the primary branch with .release-plan.json modified,
2+
# runs release-plan.
3+
4+
name: Publish Stable (Alpha)
5+
6+
on:
7+
workflow_dispatch:
8+
push:
9+
branches:
10+
- main
11+
- master
12+
paths:
13+
- '.release-plan.json'
14+
15+
concurrency:
16+
group: publish-${{ github.head_ref || github.ref }}
17+
cancel-in-progress: true
18+
19+
jobs:
20+
publish:
21+
name: "NPM Publish"
22+
runs-on: ubuntu-latest
23+
permissions:
24+
contents: write
25+
pull-requests: write
26+
id-token: write
27+
attestations: write
28+
29+
steps:
30+
- uses: actions/checkout@v4
31+
- uses: pnpm/action-setup@v4
32+
- uses: actions/setup-node@v4
33+
with:
34+
node-version: 20
35+
# This creates an .npmrc that reads the NODE_AUTH_TOKEN environment variable
36+
registry-url: 'https://registry.npmjs.org'
37+
cache: pnpm
38+
- run: pnpm install --frozen-lockfile
39+
- name: Publish to NPM
40+
run: NPM_CONFIG_PROVENANCE=true pnpm release-plan publish --github-prerelease
41+
env:
42+
GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}
43+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

RELEASE.md

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@ During the release week each of the versions are effectively "promoted" i.e. the
1616

1717
The release process during release week should look like this:
1818

19+
- Make sure that `@ember/app-blueprint` is released before starting any of these steps
1920
- Merge any outstanding `Prepare Alpha Release` branches
2021
- Do an intial stable release from the `release` branch
2122
- Merge `release` into `beta`
2223
- Do a `beta` release
2324
- Merge `beta` into `master`
2425
- Do an `alpha` release
2526

26-
### Merge any outstanding `Prepare Alpha Release` branches
27+
### Merge any outstanding `Prepare Alpha Release` branches
2728

2829
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.
2930

@@ -38,19 +39,20 @@ You can use [this saved search](https://github.com/ember-cli/ember-cli/pulls?q=i
3839
- Merge `origin/beta` into the release branch
3940
- `git merge origin/beta --no-ff`
4041
- **make sure to not update the .release-plan file** this should only ever be changed by the release-plan github scripts
41-
- **make sure to not update the .github/workflows/plan-release.yml file** this should still plan a stable release
42-
- **make sure to not update the .github/workflows/publish.yml file** this should still publish a stable release
42+
- **make sure to not update the .github/workflows/plan-stable-release.yml file** this should still plan a stable release
43+
- **make sure to not update the .github/workflows/publish-stable.yml file** this should still publish a stable release
4344
- **make sure to not update the CHANGELOG.md file** so as not to include the beta or alpha changelogs in the next release
4445
- make sure to not update the version in the package.json during this step, this will be release-plan's job
46+
- make sure to not update the version in the `packages/app-blueprint/package.json`, or `packages/addon-blueprint/package.json` files during this step, this will be release-plan's job
4547
- 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.
46-
- Update blueprint dependencies to latest
48+
- Update blueprint dependencies to latest. Note: ember-data needs to be updated only in the alpha version from now on, make sure to only update to the release version of what was in the beta.
4749

4850
```
49-
node ./dev/update-blueprint-dependencies.js --ember-source=latest --ember-data=latest
51+
node ./dev/update-blueprint-dependencies.js --ember-source=latest --ember-data=<whatever version was in the beta>
5052
```
5153

5254
- commit this update `git commit -am "update blueprint dependencies to latest"`
53-
- push and open a PR targeting `release` with a PR title like `Update all dependencies for 6.4 release`
55+
- push and open a PR targeting `release` with a PR title like `Promote Beta and update all dependencies for 6.4 release`
5456
- mark this PR as an `enhancement` if it is a minor release
5557
- check that everything is ok (i.e. that CI has run correctly and that you have the changes you expect)
5658
- merge branch
@@ -64,26 +66,30 @@ You can use [this saved search](https://github.com/ember-cli/ember-cli/pulls?q=i
6466
- create a new branch to merge `release` into `beta` e.g. `git checkout --no-track -b merge-release origin/beta`
6567
- merge release into this new branch e.g. `git merge origin/release --no-ff`
6668
- **make sure to not update the .release-plan file** this should only ever be changed by the release-plan github scripts
67-
- **make sure to not update any .github/workflows/plan-release.yml file** this should still plan a beta release
68-
- **make sure to not update any .github/workflows/publish.yml file** this should still publish a beta release
69+
- **make sure to not update any .github/workflows/plan-beta-release.yml file** this should still plan a beta release
70+
- **make sure to not update any .github/workflows/publish-beta.yml file** this should still publish a beta release
6971
- make sure to not update the version in the package.json during this step, that step comes later
7072
- make sure to not remove the `release-plan` config section to the `package.json`, `packages/addon-blueprint/package.json`, or `packages/app-blueprint/package.json`, during this step.
7173
- merge master into this new branch too e.g. `git merge origin/master --no-ff`
7274
- **make sure to not update the .release-plan file** this should only ever be changed by the release-plan github scripts
7375
- **make sure to not update the CHANGELOG.md file** in this step. It should match the changelog on `origin/release` at this stage.
76+
- make sure not to update the `release-plan` config in `package.json`, `packages/addon-blueprint/package.json`, or `packages/app-blueprint/package.json`
77+
- commit the merge `git commit -am "merge master into beta"`
78+
- update the versions in package.jsons
7479
- 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",`
7580
- update the alpha version in `packages/addon-blueprint/package.json` to be a beta
7681
- update the alpha version in `packages/app-blueprint/package.json` to be a beta
77-
- make sure not to update the `release-plan` config in `package.json`, `packages/addon-blueprint/package.json`, or `packages/app-blueprint/package.json`
7882
- update the `ember-cli` reference in `packages/app-blueprint/files/package.json` to be the same as the version you just put in the top level package.json
83+
- commit the version changes `git commit -am "update versions"`
7984
- Update blueprint dependencies to beta
8085

8186
```
8287
node ./dev/update-blueprint-dependencies.js --ember-source=beta --ember-data=beta
8388
```
8489

90+
- update the @ember/app-blueprint dependency `pnpm i -w @ember/app-blueprint@beta`
91+
- manually add a `~` back into the `@ember/app-blueprint` dependency in the root package.json
8592
- commit this update `git commit -am "update blueprint dependencies to beta"`
86-
- **TODO**: document how to update @ember/app-blueprint dependency
8793
- push and open a PR targeting `beta` with a PR title like `Prepare 6.5-beta`
8894
- mark this PR as an `enchancement` if the next beta is a minor release
8995
- check that everything is ok i.e. CI passes
@@ -104,19 +110,20 @@ You can use [this saved search](https://github.com/ember-cli/ember-cli/pulls?q=i
104110
- **make sure to not update any .github/workflows/plan-release.yml file** this should still plan a beta release
105111
- **make sure to not update any .github/workflows/publish.yml file** this should still publish a beta release
106112
- **make sure to not update the CHANGELOG.md file** in this step.
107-
- manually update the version in package.json to be the next alpha.
113+
- commit this merge
114+
- manually update the version in `package.json` to be the next alpha.
108115
- e.g. if the current alpha is `"version": "6.6.0-alpha.3",` update it to be `"version": "6.7.0-alpha.0",`
109116
- manually update the alpha version in `packages/addon-blueprint/package.json` to be the same alpha
110117
- manually update the alpha version in `packages/app-blueprint/package.json` to be the same alpha
111118
- commit this change to the version in package.json: `git commit -am "update to the next alpha version"`
112119
- Update blueprint dependencies to alpha
113120

114121
```
115-
node ./dev/update-blueprint-dependencies.js --ember-source=alpha --ember-data=canary
122+
node ./dev/update-blueprint-dependencies.js --ember-source=alpha --ember-data=latest
116123
```
117124

125+
- update the @ember/app-blueprint dependency `pnpm i -w @ember/app-blueprint@alpha`
118126
- commit this update `git commit -am "update blueprint dependencies to alpha"`
119-
- **TODO**: document how to update @ember/app-blueprint dependency
120127
- push and open a PR targeting `master` with a PR title like `Prepare 6.6-alpha`
121128
- mark this PR as an `enchancement` if the next alpha is a minor release
122129
- check that everything is ok i.e. CI passes

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ember-cli",
3-
"version": "6.8.0-beta.6",
3+
"version": "6.9.0-alpha.2",
44
"description": "Command line tool for developing ambitious ember.js apps",
55
"keywords": [
66
"app",
@@ -50,7 +50,7 @@
5050
"@ember-tooling/blueprint-model": "^0.4.1",
5151
"@ember-tooling/classic-build-addon-blueprint": "workspace:*",
5252
"@ember-tooling/classic-build-app-blueprint": "workspace:*",
53-
"@ember/app-blueprint": "~6.8.0",
53+
"@ember/app-blueprint": "~6.9.0-alpha.1",
5454
"@pnpm/find-workspace-dir": "^1000.1.0",
5555
"babel-remove-types": "^1.0.1",
5656
"broccoli": "^3.5.2",

packages/addon-blueprint/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ember-tooling/classic-build-addon-blueprint",
3-
"version": "6.8.0-beta.3",
3+
"version": "6.9.0-alpha.2",
44
"repository": {
55
"type": "git",
66
"url": "https://github.com/ember-cli/ember-cli.git",

packages/app-blueprint/files/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"broccoli-asset-rev": "^3.0.0",
6161
"concurrently": "^9.2.1",
6262
"ember-auto-import": "^2.11.1",
63-
"ember-cli": "~6.8.0",
63+
"ember-cli": "~6.9.0-alpha.2",
6464
"ember-cli-app-version": "^7.0.0",
6565
"ember-cli-babel": "^8.2.0",
6666
"ember-cli-clean-css": "^3.0.0",
@@ -76,7 +76,7 @@
7676
"ember-page-title": "^9.0.3",
7777
"ember-qunit": "^9.0.4",
7878
"ember-resolver": "^13.1.1",
79-
"ember-source": "~6.8.0",
79+
"ember-source": "~6.9.0-alpha.1",
8080
"ember-template-imports": "^4.3.0",
8181
"ember-template-lint": "^6.1.0<% if (welcome) { %>",
8282
"ember-welcome-page": "^7.0.2<% } %>",

packages/app-blueprint/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ember-tooling/classic-build-app-blueprint",
3-
"version": "6.8.0-beta.3",
3+
"version": "6.9.0-alpha.2",
44
"repository": {
55
"type": "git",
66
"url": "https://github.com/ember-cli/ember-cli.git",

pnpm-lock.yaml

Lines changed: 5 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/fixtures/addon/defaults/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@
5959
"ember-page-title": "^9.0.3",
6060
"ember-qunit": "^9.0.4",
6161
"ember-resolver": "^13.1.1",
62-
"ember-source": "~6.8.0",
62+
"ember-source": "~6.9.0-alpha.1",
6363
"ember-source-channel-url": "^3.0.0",
6464
"ember-template-lint": "^6.1.0",
6565
"ember-try": "^4.0.0",
6666
"eslint": "^9.37.0",
6767
"eslint-config-prettier": "^9.1.2",
6868
"eslint-plugin-ember": "^12.7.4",
69-
"eslint-plugin-n": "^17.23.1",
69+
"eslint-plugin-n": "^17.23.0",
7070
"eslint-plugin-qunit": "^8.2.5",
7171
"globals": "^15.15.0",
7272
"loader.js": "^4.7.0",

0 commit comments

Comments
 (0)