Skip to content

Commit afa49b8

Browse files
committed
Upgrade release-plan
1 parent e0a0864 commit afa49b8

File tree

5 files changed

+62
-341
lines changed

5 files changed

+62
-341
lines changed

.github/workflows/plan-release.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ on:
44
branches:
55
- main
66
- master
7-
pull_request:
7+
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/
88
types:
99
- labeled
10+
- unlabeled
1011

1112
concurrency:
1213
group: plan-release # only the latest one of these should ever be running
@@ -29,19 +30,20 @@ jobs:
2930
- id: check-release
3031
run: if git diff --name-only HEAD HEAD~1 | grep -w -q ".release-plan.json"; then echo "command=release"; fi >> $GITHUB_OUTPUT
3132

32-
prepare_release_notes:
33+
prepare-release-notes:
3334
name: Prepare Release Notes
3435
runs-on: ubuntu-latest
3536
timeout-minutes: 5
3637
needs: check-plan
3738
permissions:
3839
contents: write
40+
issues: read
3941
pull-requests: write
4042
outputs:
4143
explanation: ${{ steps.explanation.outputs.text }}
4244
# only run on push event if plan wasn't updated (don't create a release plan when we're releasing)
4345
# only run on labeled event if the PR has already been merged
44-
if: (github.event_name == 'push' && needs.check-plan.outputs.command != 'release') || (github.event_name == 'pull_request' && github.event.pull_request.merged == true)
46+
if: (github.event_name == 'push' && needs.check-plan.outputs.command != 'release') || (github.event_name == 'pull_request_target' && github.event.pull_request.merged == true)
4547

4648
steps:
4749
- uses: actions/checkout@v4
@@ -50,31 +52,27 @@ jobs:
5052
with:
5153
fetch-depth: 0
5254
ref: 'main'
55+
- uses: pnpm/action-setup@v4
5356
- uses: actions/setup-node@v4
5457
with:
5558
node-version: 18
56-
57-
- uses: pnpm/action-setup@v3
58-
with:
59-
version: 8
59+
cache: pnpm
6060
- run: pnpm install --frozen-lockfile
61-
6261
- name: "Generate Explanation and Prep Changelogs"
6362
id: explanation
6463
run: |
6564
set +e
66-
67-
pnpm release-plan prepare 2> >(tee -a stderr.log >&2)
68-
65+
pnpm release-plan prepare 2> >(tee -a release-plan-stderr.txt >&2)
6966
7067
if [ $? -ne 0 ]; then
7168
echo 'text<<EOF' >> $GITHUB_OUTPUT
72-
cat stderr.log >> $GITHUB_OUTPUT
69+
cat release-plan-stderr.txt >> $GITHUB_OUTPUT
7370
echo 'EOF' >> $GITHUB_OUTPUT
7471
else
7572
echo 'text<<EOF' >> $GITHUB_OUTPUT
7673
jq .description .release-plan.json -r >> $GITHUB_OUTPUT
7774
echo 'EOF' >> $GITHUB_OUTPUT
75+
rm release-plan-stderr.txt
7876
fi
7977
env:
8078
GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/publish.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,21 @@ jobs:
4141
permissions:
4242
contents: write
4343
pull-requests: write
44+
id-token: write
45+
attestations: write
4446

4547
steps:
4648
- uses: actions/checkout@v4
49+
- uses: pnpm/action-setup@v4
4750
- uses: actions/setup-node@v4
4851
with:
4952
node-version: 18
5053
# This creates an .npmrc that reads the NODE_AUTH_TOKEN environment variable
5154
registry-url: 'https://registry.npmjs.org'
52-
53-
- uses: pnpm/action-setup@v3
54-
with:
55-
version: 8
55+
cache: pnpm
5656
- run: pnpm install --frozen-lockfile
5757
- name: npm publish
58-
run: pnpm release-plan publish
59-
58+
run: NPM_CONFIG_PROVENANCE=true pnpm release-plan publish
6059
env:
6160
GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}
6261
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

RELEASE.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@ 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

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,13 @@
2121
"concurrently": "^9.0.1",
2222
"prettier": "^3.0.3",
2323
"prettier-plugin-ember-template-tag": "^2.0.0",
24-
"release-plan": "^0.10.0"
24+
"release-plan": "^0.11.0"
2525
},
2626
"packageManager": "[email protected]",
2727
"engines": {
2828
"node": ">= 22.11.0"
2929
},
3030
"pnpm": {
31-
"overrides": {
32-
"@glimmer/validator": "^0.92.0"
33-
},
3431
"peerDependencyRules": {
3532
"allowAny": [
3633
"typescript",
@@ -41,6 +38,9 @@
4138
"webpack",
4239
"rsvp"
4340
]
41+
},
42+
"overrides": {
43+
"@glimmer/validator": "^0.92.0"
4444
}
4545
}
4646
}

0 commit comments

Comments
 (0)