Skip to content

Commit d9c532b

Browse files
authored
Merge pull request #113 from ember-cli/merge-beta
Prepare 6.10 alpha
2 parents a8041c7 + e832f1b commit d9c532b

File tree

7 files changed

+278
-2
lines changed

7 files changed

+278
-2
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
types:
99
- labeled
1010
- unlabeled
11+
branches:
12+
- main
1113

1214
concurrency:
1315
group: plan-release-alpha # only the latest one of these should ever be running
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: Plan Beta Release
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- beta
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/
8+
types:
9+
- labeled
10+
- unlabeled
11+
branches:
12+
- beta
13+
14+
concurrency:
15+
group: plan-release-beta # only the latest one of these should ever be running
16+
cancel-in-progress: true
17+
18+
jobs:
19+
is-this-a-release:
20+
name: "Is this a release?"
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: 2
29+
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
34+
35+
create-prepare-release-pr:
36+
name: Create Prepare Release PR
37+
runs-on: ubuntu-latest
38+
timeout-minutes: 5
39+
needs: is-this-a-release
40+
permissions:
41+
contents: write
42+
issues: read
43+
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+
48+
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
52+
with:
53+
fetch-depth: 0
54+
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
81+
env:
82+
GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}
83+
84+
- uses: peter-evans/create-pull-request@v7
85+
with:
86+
commit-message: "Prepare Release ${{ steps.explanation.outputs.new_version}} using 'release-plan'"
87+
labels: "internal"
88+
branch: release-preview
89+
title: Prepare Beta Release ${{ steps.explanation.outputs.new_version }}
90+
body: |
91+
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 👍
92+
93+
-----------------------------------------
94+
95+
${{ steps.explanation.outputs.text }}
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: Plan Stable Release
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- release
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/
8+
types:
9+
- labeled
10+
- unlabeled
11+
branches:
12+
- release
13+
14+
concurrency:
15+
group: plan-release # only the latest one of these should ever be running
16+
cancel-in-progress: true
17+
18+
jobs:
19+
is-this-a-release:
20+
name: "Is this a release?"
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: 2
29+
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
34+
35+
create-prepare-release-pr:
36+
name: Create Prepare Release PR
37+
runs-on: ubuntu-latest
38+
timeout-minutes: 5
39+
needs: is-this-a-release
40+
permissions:
41+
contents: write
42+
issues: read
43+
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+
48+
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
52+
with:
53+
fetch-depth: 0
54+
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
81+
env:
82+
GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}
83+
84+
- uses: peter-evans/create-pull-request@v7
85+
with:
86+
commit-message: "Prepare Release ${{ steps.explanation.outputs.new_version}} using 'release-plan'"
87+
labels: "internal"
88+
branch: release-preview
89+
title: Prepare Stable Release ${{ steps.explanation.outputs.new_version }}
90+
body: |
91+
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 👍
92+
93+
-----------------------------------------
94+
95+
${{ steps.explanation.outputs.text }}

.github/workflows/publish-beta.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# For every push to the primary branch with .release-plan.json modified,
2+
# runs release-plan.
3+
4+
name: Publish Beta
5+
6+
on:
7+
workflow_dispatch:
8+
push:
9+
branches:
10+
- beta
11+
paths:
12+
- '.release-plan.json'
13+
14+
concurrency:
15+
group: publish-${{ github.head_ref || github.ref }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
publish:
20+
name: "NPM Publish"
21+
runs-on: ubuntu-latest
22+
permissions:
23+
contents: write
24+
pull-requests: write
25+
id-token: write
26+
attestations: write
27+
28+
steps:
29+
- uses: actions/checkout@v4
30+
- uses: pnpm/action-setup@v4
31+
- uses: actions/setup-node@v4
32+
with:
33+
node-version: 18
34+
# This creates an .npmrc that reads the NODE_AUTH_TOKEN environment variable
35+
registry-url: 'https://registry.npmjs.org'
36+
cache: pnpm
37+
- run: pnpm install --frozen-lockfile
38+
- name: Publish to NPM
39+
run: NPM_CONFIG_PROVENANCE=true pnpm release-plan publish --publish-branch=beta --github-prerelease
40+
env:
41+
GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}
42+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# For every push to the primary branch with .release-plan.json modified,
2+
# runs release-plan.
3+
4+
name: Publish Stable
5+
6+
on:
7+
workflow_dispatch:
8+
push:
9+
branches:
10+
- release
11+
paths:
12+
- '.release-plan.json'
13+
14+
concurrency:
15+
group: publish-${{ github.head_ref || github.ref }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
publish:
20+
name: "NPM Publish"
21+
runs-on: ubuntu-latest
22+
permissions:
23+
contents: write
24+
pull-requests: write
25+
id-token: write
26+
attestations: write
27+
28+
steps:
29+
- uses: actions/checkout@v4
30+
- uses: pnpm/action-setup@v4
31+
- uses: actions/setup-node@v4
32+
with:
33+
node-version: 18
34+
# This creates an .npmrc that reads the NODE_AUTH_TOKEN environment variable
35+
registry-url: 'https://registry.npmjs.org'
36+
cache: pnpm
37+
- run: pnpm install --frozen-lockfile
38+
- name: Publish to NPM
39+
run: NPM_CONFIG_PROVENANCE=true pnpm release-plan publish --publish-branch=release
40+
env:
41+
GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}
42+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

files/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
"ember-page-title": "^9.0.3",
8282
"ember-qunit": "^9.0.4",
8383
"ember-resolver": "^13.1.1",
84-
"ember-source": "~6.9.0-alpha.6",
84+
"ember-source": "~6.10.0-alpha.1",
8585
"ember-template-lint": "^7.9.3<% if (welcome) { %>",
8686
"ember-welcome-page": "^7.0.2<% } %>",
8787
"eslint": "^9.37.0",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ember/app-blueprint",
3-
"version": "6.9.0-alpha.2",
3+
"version": "6.10.0-alpha.0",
44
"description": "Blueprint for next generation of Ember apps",
55
"keywords": [
66
"ember-blueprint"

0 commit comments

Comments
 (0)