Skip to content

Commit 1b5940d

Browse files
Merge pull request #1130 from NullVoxPopuli/update-release-plan
Update release-plan
2 parents 09f71b9 + 6f817ee commit 1b5940d

File tree

5 files changed

+190
-143
lines changed

5 files changed

+190
-143
lines changed

.github/workflows/plan-release.yml

+27-10
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
- main
66
- master
77
pull_request:
8-
types:
8+
types:
99
- labeled
1010

1111
concurrency:
@@ -34,6 +34,9 @@ jobs:
3434
runs-on: ubuntu-latest
3535
timeout-minutes: 5
3636
needs: check-plan
37+
permissions:
38+
contents: write
39+
pull-requests: write
3740
outputs:
3841
explanation: ${{ steps.explanation.outputs.text }}
3942
# only run on push event if plan wasn't updated (don't create a release plan when we're releasing)
@@ -43,28 +46,42 @@ jobs:
4346
steps:
4447
- uses: actions/checkout@v4
4548
# We need to download lots of history so that
46-
# lerna-changelog can discover what's changed since the last release
49+
# github-changelog can discover what's changed since the last release
4750
with:
4851
fetch-depth: 0
49-
- uses: wyvox/action-setup-pnpm@v3
52+
ref: 'main'
53+
- uses: actions/setup-node@v4
54+
with:
55+
node-version: 18
56+
57+
- uses: pnpm/action-setup@v3
58+
with:
59+
version: 8
60+
- run: pnpm install --frozen-lockfile
5061

5162
- name: "Generate Explanation and Prep Changelogs"
5263
id: explanation
5364
run: |
54-
set -x
65+
set +e
5566
56-
pnpm release-plan prepare
67+
pnpm release-plan prepare 2> >(tee -a stderr.log >&2)
5768
58-
echo 'text<<EOF' >> $GITHUB_OUTPUT
59-
jq .description .release-plan.json -r >> $GITHUB_OUTPUT
60-
echo 'EOF' >> $GITHUB_OUTPUT
69+
70+
if [ $? -ne 0 ]; then
71+
echo 'text<<EOF' >> $GITHUB_OUTPUT
72+
cat stderr.log >> $GITHUB_OUTPUT
73+
echo 'EOF' >> $GITHUB_OUTPUT
74+
else
75+
echo 'text<<EOF' >> $GITHUB_OUTPUT
76+
jq .description .release-plan.json -r >> $GITHUB_OUTPUT
77+
echo 'EOF' >> $GITHUB_OUTPUT
78+
fi
6179
env:
6280
GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}
6381

64-
- uses: peter-evans/create-pull-request@v5
82+
- uses: peter-evans/create-pull-request@v6
6583
with:
6684
commit-message: "Prepare Release using 'release-plan'"
67-
author: "github-actions[bot] <github-actions-bot@users.noreply.github.com>"
6885
labels: "internal"
6986
branch: release-preview
7087
title: Prepare Release

.github/workflows/publish.yml

+12-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# For every push to the master branch, this checks if the release-plan was
22
# updated and if it was it will publish stable npm packages based on the
3-
# release plan
3+
# release plan
44

55
name: Publish Stable
66

@@ -38,13 +38,22 @@ jobs:
3838
runs-on: ubuntu-latest
3939
needs: check-plan
4040
if: needs.check-plan.outputs.command == 'release'
41+
permissions:
42+
contents: write
43+
pull-requests: write
4144

4245
steps:
4346
- uses: actions/checkout@v4
44-
- uses: wyvox/action-setup-pnpm@v3
47+
- uses: actions/setup-node@v4
4548
with:
49+
node-version: 18
4650
# This creates an .npmrc that reads the NODE_AUTH_TOKEN environment variable
47-
node-registry-url: 'https://registry.npmjs.org'
51+
registry-url: 'https://registry.npmjs.org'
52+
53+
- uses: pnpm/action-setup@v3
54+
with:
55+
version: 8
56+
- run: pnpm install --frozen-lockfile
4857
- name: npm publish
4958
run: pnpm release-plan publish
5059

RELEASE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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 prepare the release once the PR is merged.
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.
44

55
## Preparation
66

package.json

+12-13
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"license": "MIT",
55
"author": "NullVoxPopuli",
66
"scripts": {
7-
"reroll-lockfile": "git rm -f '**/pnpm-lock.yaml'; pnpm i",
87
"build": "pnpm run --filter ember-resources build",
98
"build:docs": "pnpm run --filter docs docs:collect",
109
"ci:update": "npx ember-ci-update",
@@ -13,15 +12,16 @@
1312
"dev:docs": "pnpm run --filter docs docs:watch --preserveWatchOutput",
1413
"dev:ember": "pnpm run --filter test-app start",
1514
"lint": "pnpm run --filter '*' lint",
16-
"lint:fix": "pnpm run --filter '*' lint:fix"
15+
"lint:fix": "pnpm run --filter '*' lint:fix",
16+
"reroll-lockfile": "git rm -f '**/pnpm-lock.yaml'; pnpm i"
1717
},
1818
"devDependencies": {
1919
"@nullvoxpopuli/eslint-configs": "^3.2.0",
2020
"concurrently": "^8.0.0",
2121
"eslint": "^8.35.0",
2222
"loader.js": "^4.7.0",
2323
"prettier": "^3.1.1",
24-
"release-plan": "^0.6.0",
24+
"release-plan": "^0.9.0",
2525
"typescript": "^5.0.0"
2626
},
2727
"packageManager": "pnpm@8.14.1",
@@ -35,21 +35,20 @@
3535
"pnpm": "8.14.1"
3636
},
3737
"pnpm": {
38-
"overrides": {
39-
"@glimmer/manager": ">= 0.87.1",
40-
"@glimmer/validator": ">= 0.87.1",
41-
"release-plan": "github:embroider-build/release-plan#tmp-manypkg-dist",
42-
"ember-eslint-parser": "0.2.5",
43-
"eslint-plugin-ember": "github:ember-cli/eslint-plugin-ember#master"
44-
},
4538
"peerDependencyRules": {
46-
"ignoreMissing": [
47-
"webpack"
48-
],
4939
"allowAny": [
5040
"ember-source",
5141
"typescript"
42+
],
43+
"ignoreMissing": [
44+
"webpack"
5245
]
46+
},
47+
"overrides": {
48+
"@glimmer/manager": ">= 0.87.1",
49+
"@glimmer/validator": ">= 0.87.1",
50+
"ember-eslint-parser": "0.2.5",
51+
"eslint-plugin-ember": "github:ember-cli/eslint-plugin-ember#master"
5352
}
5453
}
5554
}

0 commit comments

Comments
 (0)