Skip to content

Commit cbbb223

Browse files
Merge pull request #223 from ember-cli/update-release-plan
Update release plan
2 parents 555b71f + e81ceaa commit cbbb223

File tree

5 files changed

+1162
-106
lines changed

5 files changed

+1162
-106
lines changed

.github/workflows/plan-release.yml

Lines changed: 20 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
name: Release Plan Review
1+
name: Plan Release
22
on:
3+
workflow_dispatch:
34
push:
45
branches:
56
- main
@@ -14,79 +15,44 @@ concurrency:
1415
cancel-in-progress: true
1516

1617
jobs:
17-
check-plan:
18-
name: "Check Release Plan"
18+
should-run-release-plan-prepare:
19+
name: Should we run release-plan prepare?
1920
runs-on: ubuntu-latest
2021
outputs:
21-
command: ${{ steps.check-release.outputs.command }}
22-
22+
should-prepare: ${{ steps.should-prepare.outputs.should-prepare }}
2323
steps:
24-
- uses: actions/checkout@v4
24+
- uses: release-plan/actions/should-prepare-release@v1
2525
with:
26-
fetch-depth: 0
2726
ref: 'main'
28-
# This will only cause the `check-plan` job to have a "command" of `release`
29-
# when the .release-plan.json file was changed on the last commit.
30-
- id: check-release
31-
run: if git diff --name-only HEAD HEAD~1 | grep -w -q ".release-plan.json"; then echo "command=release"; fi >> $GITHUB_OUTPUT
27+
id: should-prepare
3228

33-
prepare_release_notes:
34-
name: Prepare Release Notes
29+
create-prepare-release-pr:
30+
name: Create Prepare Release PR
3531
runs-on: ubuntu-latest
3632
timeout-minutes: 5
37-
needs: check-plan
33+
needs: should-run-release-plan-prepare
3834
permissions:
3935
contents: write
36+
issues: read
4037
pull-requests: write
41-
outputs:
42-
explanation: ${{ steps.explanation.outputs.text }}
43-
# only run on push event if plan wasn't updated (don't create a release plan when we're releasing)
44-
# only run on labeled event if the PR has already been merged
45-
if: (github.event_name == 'push' && needs.check-plan.outputs.command != 'release') || (github.event_name == 'pull_request_target' && github.event.pull_request.merged == true)
46-
38+
if: needs.should-run-release-plan-prepare.outputs.should-prepare == 'true'
4739
steps:
48-
- uses: actions/checkout@v4
49-
# We need to download lots of history so that
50-
# github-changelog can discover what's changed since the last release
40+
- uses: release-plan/actions/prepare@v1
41+
name: Run release-plan prepare
5142
with:
52-
fetch-depth: 0
5343
ref: 'main'
54-
- uses: actions/setup-node@v4
55-
with:
56-
node-version: 18
57-
58-
- uses: pnpm/action-setup@v3
59-
with:
60-
version: 8
61-
- run: pnpm install --frozen-lockfile
62-
63-
- name: "Generate Explanation and Prep Changelogs"
64-
id: explanation
65-
run: |
66-
set +e
67-
68-
pnpm release-plan prepare 2> >(tee -a release-plan-stderr.txt >&2)
69-
70-
71-
if [ $? -ne 0 ]; then
72-
echo 'text<<EOF' >> $GITHUB_OUTPUT
73-
cat release-plan-stderr.txt >> $GITHUB_OUTPUT
74-
echo 'EOF' >> $GITHUB_OUTPUT
75-
else
76-
echo 'text<<EOF' >> $GITHUB_OUTPUT
77-
jq .description .release-plan.json -r >> $GITHUB_OUTPUT
78-
echo 'EOF' >> $GITHUB_OUTPUT
79-
rm release-plan-stderr.txt
80-
fi
8144
env:
8245
GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}
46+
id: explanation
8347

84-
- uses: peter-evans/create-pull-request@v6
48+
- uses: peter-evans/create-pull-request@v7
49+
name: Create Prepare Release PR
8550
with:
86-
commit-message: "Prepare Release using 'release-plan'"
51+
commit-message: "Prepare Release ${{ steps.explanation.outputs.new-version}} using 'release-plan'"
8752
labels: "internal"
53+
sign-commits: true
8854
branch: release-preview
89-
title: Prepare Release
55+
title: Prepare Release ${{ steps.explanation.outputs.new-version }}
9056
body: |
9157
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 👍
9258

.github/workflows/publish.yml

Lines changed: 15 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
# For every push to the master branch, this checks if the release-plan was
2-
# updated and if it was it will publish stable npm packages based on the
3-
# release plan
1+
# For every push to the primary branch with .release-plan.json modified,
2+
# runs release-plan.
43

54
name: Publish Stable
65

@@ -10,53 +9,33 @@ on:
109
branches:
1110
- main
1211
- master
12+
paths:
13+
- ".release-plan.json"
1314

1415
concurrency:
1516
group: publish-${{ github.head_ref || github.ref }}
1617
cancel-in-progress: true
1718

1819
jobs:
19-
check-plan:
20-
name: "Check Release Plan"
21-
runs-on: ubuntu-latest
22-
outputs:
23-
command: ${{ steps.check-release.outputs.command }}
24-
25-
steps:
26-
- uses: actions/checkout@v4
27-
with:
28-
fetch-depth: 0
29-
ref: 'main'
30-
# This will only cause the `check-plan` job to have a result of `success`
31-
# when the .release-plan.json file was changed on the last commit. This
32-
# plus the fact that this action only runs on main will be enough of a guard
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-
3620
publish:
3721
name: "NPM Publish"
3822
runs-on: ubuntu-latest
39-
needs: check-plan
40-
if: needs.check-plan.outputs.command == 'release'
4123
permissions:
4224
contents: write
43-
pull-requests: write
25+
id-token: write
26+
attestations: write
4427

4528
steps:
46-
- uses: actions/checkout@v4
47-
- uses: actions/setup-node@v4
48-
with:
49-
node-version: 18
50-
# This creates an .npmrc that reads the NODE_AUTH_TOKEN environment variable
51-
registry-url: 'https://registry.npmjs.org'
52-
53-
- uses: pnpm/action-setup@v3
29+
- uses: actions/checkout@v6
30+
- uses: pnpm/action-setup@v4
31+
- uses: actions/setup-node@v6
5432
with:
55-
version: 8
33+
node-version: 22
34+
registry-url: "https://registry.npmjs.org"
35+
cache: pnpm
5636
- run: pnpm install --frozen-lockfile
57-
- name: npm publish
58-
run: pnpm release-plan publish
59-
37+
- run: npm install -g npm@latest # ensure that the globally installed npm is new enough to support OIDC
38+
- name: Publish to NPM
39+
run: NPM_CONFIG_PROVENANCE=true pnpm release-plan publish
6040
env:
6141
GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}
62-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

RELEASE.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,24 @@ Releases in this repo are mostly automated using [release-plan](https://github.c
44

55
## Preparation
66

7-
Since the majority of the actual release process is automated, the remaining tasks before releasing are:
7+
Since the majority of the actual release process is automated, the remaining tasks before releasing are:
88

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
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
1111

1212
Some great information on why this is important can be found at [keepachangelog.com](https://keepachangelog.com/en/1.1.0/), but the overall
1313
guiding principle here is that changelogs are for humans, not machines.
1414

1515
When reviewing merged PR's the labels to be used are:
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+
- 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.
2222

2323
**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`
2424

2525
## Release
2626

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/mixonic/ember-cli-deprecation-workflow/pulls?q=is%3Apr+is%3Aopen+%22Prepare+Release%22+in%3Atitle) PR
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-cli-deprecation-workflow/pulls?q=is%3Apr+is%3Aopen+%22Prepare+Release%22+in%3Atitle) PR

package.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,15 @@
7575
"prettier-plugin-ember-template-tag": "^2.0.4",
7676
"qunit": "^2.24.1",
7777
"qunit-dom": "^3.4.0",
78+
"release-plan": "^0.17.0",
7879
"rollup": "^4.22.5",
7980
"testem": "^3.15.1",
8081
"vite": "^7.1.9"
8182
},
82-
"ember": {
83-
"edition": "octane"
83+
"packageManager": "[email protected]",
84+
"volta": {
85+
"node": "22",
86+
"pnpm": "10.26.0"
8487
},
8588
"publishConfig": {
8689
"registry": "https://registry.npmjs.org"
@@ -95,14 +98,12 @@
9598
"internal": ":house: Internal"
9699
}
97100
},
101+
"ember": {
102+
"edition": "octane"
103+
},
98104
"ember-addon": {
99105
"version": 2,
100106
"type": "addon",
101107
"main": "addon-main.cjs"
102-
},
103-
"packageManager": "[email protected]",
104-
"volta": {
105-
"node": "22",
106-
"pnpm": "10.26.0"
107108
}
108109
}

0 commit comments

Comments
 (0)