Skip to content

Commit d563f8e

Browse files
authored
Merge pull request #219 from ember-cli/merge-release-beta
Merge release into beta
2 parents 3babefd + 1f84139 commit d563f8e

12 files changed

Lines changed: 128 additions & 305 deletions

.github/workflows/plan-alpha-release.yml

Lines changed: 15 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -8,85 +8,50 @@ on:
88
types:
99
- labeled
1010
- unlabeled
11-
branches:
12-
- main
1311

1412
concurrency:
1513
group: plan-release-alpha # only the latest one of these should ever be running
1614
cancel-in-progress: true
1715

1816
jobs:
19-
is-this-a-release:
20-
name: "Is this a release?"
17+
should-run-release-plan-prepare:
18+
name: Should we run release-plan prepare?
2119
runs-on: ubuntu-latest
2220
outputs:
23-
command: ${{ steps.check-release.outputs.command }}
24-
21+
should-prepare: ${{ steps.should-prepare.outputs.should-prepare }}
2522
steps:
26-
- uses: actions/checkout@v4
23+
- uses: release-plan/actions/should-prepare-release@v1
2724
with:
28-
fetch-depth: 2
2925
ref: 'main'
30-
# This will only cause the `is-this-a-release` job to have a "command" of `release`
31-
# when the .release-plan.json file was changed on the last commit.
32-
- id: check-release
33-
run: if git diff --name-only HEAD HEAD~1 | grep -w -q ".release-plan.json"; then echo "command=release"; fi >> $GITHUB_OUTPUT
26+
id: should-prepare
3427

3528
create-prepare-release-pr:
3629
name: Create Prepare Release PR
3730
runs-on: ubuntu-latest
3831
timeout-minutes: 5
39-
needs: is-this-a-release
32+
needs: should-run-release-plan-prepare
4033
permissions:
4134
contents: write
4235
issues: read
4336
pull-requests: write
44-
# only run on push event or workflow dispatch if plan wasn't updated (don't create a release plan when we're releasing)
45-
# only run on labeled event if the PR has already been merged
46-
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)
47-
37+
if: needs.should-run-release-plan-prepare.outputs.should-prepare == 'true'
4838
steps:
49-
- uses: actions/checkout@v4
50-
# We need to download lots of history so that
51-
# github-changelog can discover what's changed since the last release
39+
- uses: release-plan/actions/prepare@v1
40+
name: Run release-plan prepare
5241
with:
53-
fetch-depth: 0
5442
ref: 'main'
55-
- uses: pnpm/action-setup@v4
56-
- uses: actions/setup-node@v4
57-
with:
58-
node-version: 18
59-
cache: pnpm
60-
- run: pnpm install --frozen-lockfile
61-
- name: "Generate Explanation and Prep Changelogs"
62-
id: explanation
63-
run: |
64-
set +e
65-
pnpm release-plan prepare 2> >(tee -a release-plan-stderr.txt >&2)
66-
67-
if [ $? -ne 0 ]; then
68-
release_plan_output=$(cat release-plan-stderr.txt)
69-
else
70-
release_plan_output=$(jq .description .release-plan.json -r)
71-
rm release-plan-stderr.txt
72-
73-
if [ $(jq '.solution | length' .release-plan.json) -eq 1 ]; then
74-
new_version=$(jq -r '.solution[].newVersion' .release-plan.json)
75-
echo "new_version=v$new_version" >> $GITHUB_OUTPUT
76-
fi
77-
fi
78-
echo 'text<<EOF' >> $GITHUB_OUTPUT
79-
echo "$release_plan_output" >> $GITHUB_OUTPUT
80-
echo 'EOF' >> $GITHUB_OUTPUT
8143
env:
8244
GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}
45+
id: explanation
8346

84-
- uses: peter-evans/create-pull-request@v7
47+
- uses: peter-evans/create-pull-request@v8
48+
name: Create Prepare Release PR
8549
with:
86-
commit-message: "Prepare Release ${{ steps.explanation.outputs.new_version}} using 'release-plan'"
50+
commit-message: "Prepare Release ${{ steps.explanation.outputs.new-version}} using 'release-plan'"
8751
labels: "internal"
52+
sign-commits: true
8853
branch: release-preview
89-
title: Prepare Alpha Release ${{ steps.explanation.outputs.new_version }}
54+
title: Prepare Alpha Release ${{ steps.explanation.outputs.new-version }}
9055
body: |
9156
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 👍
9257

.github/workflows/plan-beta-release.yml

Lines changed: 16 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -8,85 +8,50 @@ on:
88
types:
99
- labeled
1010
- unlabeled
11-
branches:
12-
- beta
1311

1412
concurrency:
1513
group: plan-release-beta # only the latest one of these should ever be running
1614
cancel-in-progress: true
1715

1816
jobs:
19-
is-this-a-release:
20-
name: "Is this a release?"
17+
should-run-release-plan-prepare:
18+
name: Should we run release-plan prepare?
2119
runs-on: ubuntu-latest
2220
outputs:
23-
command: ${{ steps.check-release.outputs.command }}
24-
21+
should-prepare: ${{ steps.should-prepare.outputs.should-prepare }}
2522
steps:
26-
- uses: actions/checkout@v4
23+
- uses: release-plan/actions/should-prepare-release@v1
2724
with:
28-
fetch-depth: 2
2925
ref: 'beta'
30-
# This will only cause the `is-this-a-release` job to have a "command" of `release`
31-
# when the .release-plan.json file was changed on the last commit.
32-
- id: check-release
33-
run: if git diff --name-only HEAD HEAD~1 | grep -w -q ".release-plan.json"; then echo "command=release"; fi >> $GITHUB_OUTPUT
26+
id: should-prepare
3427

3528
create-prepare-release-pr:
3629
name: Create Prepare Release PR
3730
runs-on: ubuntu-latest
3831
timeout-minutes: 5
39-
needs: is-this-a-release
32+
needs: should-run-release-plan-prepare
4033
permissions:
4134
contents: write
4235
issues: read
4336
pull-requests: write
44-
# only run on push event or workflow dispatch if plan wasn't updated (don't create a release plan when we're releasing)
45-
# only run on labeled event if the PR has already been merged
46-
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)
47-
37+
if: needs.should-run-release-plan-prepare.outputs.should-prepare == 'true'
4838
steps:
49-
- uses: actions/checkout@v4
50-
# We need to download lots of history so that
51-
# github-changelog can discover what's changed since the last release
39+
- uses: release-plan/actions/prepare@v1
40+
name: Run release-plan prepare
5241
with:
53-
fetch-depth: 0
5442
ref: 'beta'
55-
- uses: pnpm/action-setup@v4
56-
- uses: actions/setup-node@v4
57-
with:
58-
node-version: 18
59-
cache: pnpm
60-
- run: pnpm install --frozen-lockfile
61-
- name: "Generate Explanation and Prep Changelogs"
62-
id: explanation
63-
run: |
64-
set +e
65-
pnpm release-plan prepare 2> >(tee -a release-plan-stderr.txt >&2)
66-
67-
if [ $? -ne 0 ]; then
68-
release_plan_output=$(cat release-plan-stderr.txt)
69-
else
70-
release_plan_output=$(jq .description .release-plan.json -r)
71-
rm release-plan-stderr.txt
72-
73-
if [ $(jq '.solution | length' .release-plan.json) -eq 1 ]; then
74-
new_version=$(jq -r '.solution[].newVersion' .release-plan.json)
75-
echo "new_version=v$new_version" >> $GITHUB_OUTPUT
76-
fi
77-
fi
78-
echo 'text<<EOF' >> $GITHUB_OUTPUT
79-
echo "$release_plan_output" >> $GITHUB_OUTPUT
80-
echo 'EOF' >> $GITHUB_OUTPUT
8143
env:
8244
GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}
45+
id: explanation
8346

84-
- uses: peter-evans/create-pull-request@v7
47+
- uses: peter-evans/create-pull-request@v8
48+
name: Create Prepare Release PR
8549
with:
86-
commit-message: "Prepare Release ${{ steps.explanation.outputs.new_version}} using 'release-plan'"
50+
commit-message: "Prepare Release ${{ steps.explanation.outputs.new-version}} using 'release-plan'"
8751
labels: "internal"
88-
branch: release-preview
89-
title: Prepare Beta Release ${{ steps.explanation.outputs.new_version }}
52+
sign-commits: true
53+
branch: release-preview-beta
54+
title: Prepare Beta Release ${{ steps.explanation.outputs.new-version }}
9055
body: |
9156
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 👍
9257

.github/workflows/plan-stable-release.yml

Lines changed: 16 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -8,85 +8,50 @@ on:
88
types:
99
- labeled
1010
- unlabeled
11-
branches:
12-
- release
1311

1412
concurrency:
1513
group: plan-release # only the latest one of these should ever be running
1614
cancel-in-progress: true
1715

1816
jobs:
19-
is-this-a-release:
20-
name: "Is this a release?"
17+
should-run-release-plan-prepare:
18+
name: Should we run release-plan prepare?
2119
runs-on: ubuntu-latest
2220
outputs:
23-
command: ${{ steps.check-release.outputs.command }}
24-
21+
should-prepare: ${{ steps.should-prepare.outputs.should-prepare }}
2522
steps:
26-
- uses: actions/checkout@v4
23+
- uses: release-plan/actions/should-prepare-release@v1
2724
with:
28-
fetch-depth: 2
2925
ref: 'release'
30-
# This will only cause the `is-this-a-release` job to have a "command" of `release`
31-
# when the .release-plan.json file was changed on the last commit.
32-
- id: check-release
33-
run: if git diff --name-only HEAD HEAD~1 | grep -w -q ".release-plan.json"; then echo "command=release"; fi >> $GITHUB_OUTPUT
26+
id: should-prepare
3427

3528
create-prepare-release-pr:
3629
name: Create Prepare Release PR
3730
runs-on: ubuntu-latest
3831
timeout-minutes: 5
39-
needs: is-this-a-release
32+
needs: should-run-release-plan-prepare
4033
permissions:
4134
contents: write
4235
issues: read
4336
pull-requests: write
44-
# only run on push event or workflow dispatch if plan wasn't updated (don't create a release plan when we're releasing)
45-
# only run on labeled event if the PR has already been merged
46-
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)
47-
37+
if: needs.should-run-release-plan-prepare.outputs.should-prepare == 'true'
4838
steps:
49-
- uses: actions/checkout@v4
50-
# We need to download lots of history so that
51-
# github-changelog can discover what's changed since the last release
39+
- uses: release-plan/actions/prepare@v1
40+
name: Run release-plan prepare
5241
with:
53-
fetch-depth: 0
5442
ref: 'release'
55-
- uses: pnpm/action-setup@v4
56-
- uses: actions/setup-node@v4
57-
with:
58-
node-version: 18
59-
cache: pnpm
60-
- run: pnpm install --frozen-lockfile
61-
- name: "Generate Explanation and Prep Changelogs"
62-
id: explanation
63-
run: |
64-
set +e
65-
pnpm release-plan prepare 2> >(tee -a release-plan-stderr.txt >&2)
66-
67-
if [ $? -ne 0 ]; then
68-
release_plan_output=$(cat release-plan-stderr.txt)
69-
else
70-
release_plan_output=$(jq .description .release-plan.json -r)
71-
rm release-plan-stderr.txt
72-
73-
if [ $(jq '.solution | length' .release-plan.json) -eq 1 ]; then
74-
new_version=$(jq -r '.solution[].newVersion' .release-plan.json)
75-
echo "new_version=v$new_version" >> $GITHUB_OUTPUT
76-
fi
77-
fi
78-
echo 'text<<EOF' >> $GITHUB_OUTPUT
79-
echo "$release_plan_output" >> $GITHUB_OUTPUT
80-
echo 'EOF' >> $GITHUB_OUTPUT
8143
env:
8244
GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}
45+
id: explanation
8346

84-
- uses: peter-evans/create-pull-request@v7
47+
- uses: peter-evans/create-pull-request@v8
48+
name: Create Prepare Release PR
8549
with:
86-
commit-message: "Prepare Release ${{ steps.explanation.outputs.new_version}} using 'release-plan'"
50+
commit-message: "Prepare Release ${{ steps.explanation.outputs.new-version}} using 'release-plan'"
8751
labels: "internal"
88-
branch: release-preview
89-
title: Prepare Stable Release ${{ steps.explanation.outputs.new_version }}
52+
sign-commits: true
53+
branch: release-preview-stable
54+
title: Prepare Stable Release ${{ steps.explanation.outputs.new-version }}
9055
body: |
9156
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 👍
9257

.github/workflows/publish-alpha.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

.github/workflows/publish-beta.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)