Skip to content

Commit debe4c3

Browse files
authored
Fix release (#2685)
2 parents 3cf4eaf + d5dcfba commit debe4c3

File tree

5 files changed

+180
-184
lines changed

5 files changed

+180
-184
lines changed

.github/workflows/build.yml

Lines changed: 26 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ jobs:
1919
env:
2020
CI: 'true'
2121
steps:
22-
- name: Checkout
23-
uses: actions/checkout@v3
22+
- uses: actions/checkout@v4
2423
# Code Climate expects these variables to be set
2524
- name: Set up commit metadata
2625
if: github.event_name == 'push'
@@ -38,10 +37,12 @@ jobs:
3837
run: |
3938
echo "GIT_COMMIT_SHA=${GIT_COMMIT_SHA}" >> $GITHUB_ENV
4039
echo "GIT_BRANCH=${GIT_BRANCH}" >> $GITHUB_ENV
41-
- name: setup pnpm & node
42-
uses: wyvox/action-setup-pnpm@v3
43-
- name: Install dependencies (pnpm)
44-
run: pnpm install
40+
- uses: pnpm/action-setup@v4
41+
- uses: actions/setup-node@v4
42+
with:
43+
node-version: 22
44+
cache: pnpm
45+
- run: pnpm install
4546
- name: Lint (hbs)
4647
run: pnpm lint:hbs
4748
- name: Lint (js)
@@ -99,12 +100,13 @@ jobs:
99100
- ember-default-no-prototype-extensions
100101

101102
steps:
102-
- name: Checkout
103-
uses: actions/checkout@v3
104-
- name: setup pnpm & node
105-
uses: wyvox/action-setup-pnpm@v3
106-
- name: Install dependencies (pnpm)
107-
run: pnpm install
103+
- uses: actions/checkout@v4
104+
- uses: pnpm/action-setup@v4
105+
- uses: actions/setup-node@v4
106+
with:
107+
node-version: 22
108+
cache: pnpm
109+
- run: pnpm install
108110
- name: Set NO_EXTEND_PROTOTYPES
109111
if: matrix.scenario == 'ember-default-no-prototype-extensions'
110112
run: echo "NO_EXTEND_PROTOTYPES==true" >> .GITHUB_ENV
@@ -123,12 +125,13 @@ jobs:
123125
env:
124126
CI: 'true'
125127
steps:
126-
- name: Checkout
127-
uses: actions/checkout@v3
128-
- name: setup pnpm & node
129-
uses: wyvox/action-setup-pnpm@v3
130-
- name: Install dependencies (pnpm)
131-
run: pnpm install
128+
- uses: actions/checkout@v4
129+
- uses: pnpm/action-setup@v4
130+
- uses: actions/setup-node@v4
131+
with:
132+
node-version: 22
133+
cache: pnpm
134+
- run: pnpm install
132135
- name: Download panes
133136
run: node scripts/download-panes.js
134137
env:
@@ -228,31 +231,6 @@ jobs:
228231
name: npm
229232
path: dist/npm
230233

231-
publish-bookmarklet:
232-
name: Publish bookmarklet
233-
needs:
234-
- test
235-
- ember-try
236-
- build
237-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
238-
runs-on: ubuntu-latest
239-
steps:
240-
- name: Download artifacts (bookmarklet)
241-
uses: actions/download-artifact@v4
242-
with:
243-
name: bookmarklet
244-
path: bookmarklet
245-
- name: Upload to S3
246-
uses: jakejarvis/[email protected]
247-
with:
248-
args: --acl public-read --cache-control "max-age=86400000,public"
249-
env:
250-
AWS_S3_BUCKET: ember-extension
251-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
252-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
253-
SOURCE_DIR: bookmarklet
254-
DEST_DIR: dist_bookmarklet
255-
256234
publish-chrome:
257235
name: Publish Chrome extension
258236
needs:
@@ -272,76 +250,11 @@ jobs:
272250
path: chrome
273251
- name: Set Environment Variables
274252
run: |
275-
if [[ "$GITHUB_EVENT_NAME" == "schedule" ]]; then
276-
echo "EXTENSION_ID=ibdbkmdgflhglikhjdbogjjflkialpfi" >> $GITHUB_ENV
277-
echo "CLIENT_ID=${{ secrets.GOOGLE_NIGHTLY_CLIENT_ID }}" >> $GITHUB_ENV
278-
echo "CLIENT_SECRET=${{ secrets.GOOGLE_NIGHTLY_CLIENT_SECRET }}" >> $GITHUB_ENV
279-
echo "REFRESH_TOKEN=${{ secrets.GOOGLE_NIGHTLY_REFRESH_TOKEN }}" >> $GITHUB_ENV
280-
else
281-
echo "EXTENSION_ID=bmdblncegkenkacieihfhpjfppoconhi" >> $GITHUB_ENV
282-
echo "CLIENT_ID=${{ secrets.GOOGLE_NIGHTLY_CLIENT_ID }}" >> $GITHUB_ENV
283-
echo "CLIENT_SECRET=${{ secrets.GOOGLE_NIGHTLY_CLIENT_SECRET }}" >> $GITHUB_ENV
284-
echo "REFRESH_TOKEN=${{ secrets.GOOGLE_NIGHTLY_REFRESH_TOKEN }}" >> $GITHUB_ENV
285-
fi
253+
echo "EXTENSION_ID=ibdbkmdgflhglikhjdbogjjflkialpfi" >> $GITHUB_ENV
254+
echo "CLIENT_ID=${{ secrets.GOOGLE_NIGHTLY_CLIENT_ID }}" >> $GITHUB_ENV
255+
echo "CLIENT_SECRET=${{ secrets.GOOGLE_NIGHTLY_CLIENT_SECRET }}" >> $GITHUB_ENV
256+
echo "REFRESH_TOKEN=${{ secrets.GOOGLE_NIGHTLY_REFRESH_TOKEN }}" >> $GITHUB_ENV
286257
- name: Upload to Chrome Web Store
287258
if: >-
288-
github.event_name == 'schedule' ||
289-
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'))
259+
github.event_name == 'schedule'
290260
run: chrome-webstore-upload upload --source chrome --auto-publish
291-
292-
publish-firefox:
293-
name: Publish Firefox extension
294-
needs:
295-
- test
296-
- ember-try
297-
- build
298-
runs-on: ubuntu-latest
299-
steps:
300-
- name: Set up nod
301-
uses: actions/setup-node@v4
302-
- name: Install dependencies (web-ext)
303-
run: |
304-
npm install -g web-ext
305-
# https://github.com/mozilla/web-ext/issues/804
306-
npm install -g web-ext-submit
307-
- name: Download artifacts (Firefox)
308-
uses: actions/download-artifact@v4
309-
with:
310-
name: firefox
311-
path: firefox
312-
- name: Upload to AMO
313-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
314-
working-directory: firefox
315-
run: web-ext-submit --channel=listed
316-
env:
317-
WEB_EXT_API_KEY: ${{ secrets.FIREFOX_API_KEY }}
318-
WEB_EXT_API_SECRET: ${{ secrets.FIREFOX_API_SECRET }}
319-
320-
publish-npm:
321-
name: Publish npm package
322-
needs:
323-
- test
324-
- ember-try
325-
- build
326-
runs-on: ubuntu-latest
327-
steps:
328-
- name: Set up node
329-
uses: actions/setup-node@v4
330-
- name: Download artifacts (npm)
331-
uses: actions/download-artifact@v4
332-
with:
333-
name: npm
334-
path: npm
335-
- name: Publish to npm
336-
if: >-
337-
github.event_name == 'schedule' ||
338-
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'))
339-
env:
340-
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
341-
working-directory: npm
342-
run: |
343-
echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}"> ~/.npmrc
344-
npm whoami
345-
if [[ "$GITHUB_EVENT_NAME" == "schedule" ]]; then
346-
npm publish --tag alpha
347-
fi

.github/workflows/publish.yml

Lines changed: 119 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,123 @@ concurrency:
1717
cancel-in-progress: true
1818

1919
jobs:
20+
21+
build:
22+
name: Build extensions
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
- uses: pnpm/action-setup@v4
27+
- uses: actions/setup-node@v4
28+
with:
29+
node-version: 22
30+
cache: pnpm
31+
- run: pnpm install
32+
- name: Download panes
33+
run: node scripts/download-panes.js
34+
env:
35+
EMBER_ENV: production
36+
- name: Build
37+
run: pnpm build:production
38+
- name: Pack
39+
run: |
40+
VERSION="$(jq -r '.version' package.json)"
41+
42+
pnpm pack
43+
mkdir -p dist/npm
44+
tar xvzf "ember-inspector-$VERSION.tgz" -C dist/npm --strip-components 1
45+
- name: Upload artifacts (bookmarklet)
46+
uses: actions/upload-artifact@v4
47+
with:
48+
name: bookmarklet
49+
path: dist/bookmarklet
50+
- name: Upload artifacts (Chrome)
51+
uses: actions/upload-artifact@v4
52+
with:
53+
name: chrome
54+
path: dist/chrome
55+
- name: Upload artifacts (Firefox)
56+
uses: actions/upload-artifact@v4
57+
with:
58+
name: firefox
59+
path: dist/firefox
60+
- name: Upload artifacts (npm)
61+
uses: actions/upload-artifact@v4
62+
with:
63+
name: npm
64+
path: dist/npm
65+
66+
publish-bookmarklet:
67+
name: Publish bookmarklet
68+
needs:
69+
- build
70+
runs-on: ubuntu-latest
71+
steps:
72+
- name: Download artifacts (bookmarklet)
73+
uses: actions/download-artifact@v4
74+
with:
75+
name: bookmarklet
76+
path: bookmarklet
77+
- name: Upload to S3
78+
uses: jakejarvis/[email protected]
79+
with:
80+
args: --acl public-read --cache-control "max-age=86400000,public"
81+
env:
82+
AWS_S3_BUCKET: ember-extension
83+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
84+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
85+
SOURCE_DIR: bookmarklet
86+
DEST_DIR: dist_bookmarklet
87+
88+
publish-chrome:
89+
name: Publish Chrome extension
90+
needs:
91+
- build
92+
runs-on: ubuntu-latest
93+
steps:
94+
- name: Set up node
95+
uses: actions/setup-node@v4
96+
- name: Install dependencies (chrome-webstore-upload-cli)
97+
run: npm install -g chrome-webstore-upload-cli
98+
- name: Download artifacts (Chrome)
99+
uses: actions/download-artifact@v4
100+
with:
101+
name: chrome
102+
path: chrome
103+
- name: Set Environment Variables
104+
run: |
105+
echo "EXTENSION_ID=bmdblncegkenkacieihfhpjfppoconhi" >> $GITHUB_ENV
106+
echo "CLIENT_ID=${{ secrets.GOOGLE_NIGHTLY_CLIENT_ID }}" >> $GITHUB_ENV
107+
echo "CLIENT_SECRET=${{ secrets.GOOGLE_NIGHTLY_CLIENT_SECRET }}" >> $GITHUB_ENV
108+
echo "REFRESH_TOKEN=${{ secrets.GOOGLE_NIGHTLY_REFRESH_TOKEN }}" >> $GITHUB_ENV
109+
- name: Upload to Chrome Web Store
110+
run: chrome-webstore-upload upload --source chrome --auto-publish
111+
112+
publish-firefox:
113+
name: Publish Firefox extension
114+
needs:
115+
- build
116+
runs-on: ubuntu-latest
117+
steps:
118+
- name: Set up nod
119+
uses: actions/setup-node@v4
120+
- name: Install dependencies (web-ext)
121+
run: |
122+
npm install -g web-ext
123+
# https://github.com/mozilla/web-ext/issues/804
124+
npm install -g web-ext-submit
125+
- name: Download artifacts (Firefox)
126+
uses: actions/download-artifact@v4
127+
with:
128+
name: firefox
129+
path: firefox
130+
- name: Upload to AMO
131+
working-directory: firefox
132+
run: web-ext-submit --channel=listed
133+
env:
134+
WEB_EXT_API_KEY: ${{ secrets.FIREFOX_API_KEY }}
135+
WEB_EXT_API_SECRET: ${{ secrets.FIREFOX_API_SECRET }}
136+
20137
publish:
21138
name: "NPM Publish"
22139
runs-on: ubuntu-latest
@@ -28,7 +145,7 @@ jobs:
28145

29146
steps:
30147
- uses: actions/checkout@v4
31-
with:
148+
with:
32149
token: ${{ secrets.GH_PAT }}
33150
- uses: pnpm/action-setup@v4
34151
- uses: actions/setup-node@v4
@@ -38,6 +155,7 @@ jobs:
38155
registry-url: 'https://registry.npmjs.org'
39156
cache: pnpm
40157
- run: pnpm install --frozen-lockfile
158+
- run: pnpm build:production
41159
- name: Publish to NPM
42160
run: NPM_CONFIG_PROVENANCE=true pnpm release-plan publish
43161
env:

RELEASE.md

Lines changed: 15 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,27 @@
1-
# Release
2-
3-
Releases are mostly automated using
4-
[release-it](https://github.com/release-it/release-it/) and
5-
[lerna-changelog](https://github.com/lerna/lerna-changelog/).
1+
# Release Process
62

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.
74

85
## Preparation
96

10-
Since the majority of the actual release process is automated, the primary
11-
remaining task prior to releasing is confirming that all pull requests that
12-
have been merged since the last release have been labeled with the appropriate
13-
`lerna-changelog` labels and the titles have been updated to ensure they
14-
represent something that would make sense to our users. Some great information
15-
on why this is important can be found at
16-
[keepachangelog.com](https://keepachangelog.com/en/1.0.0/), but the overall
7+
Since the majority of the actual release process is automated, the remaining tasks before releasing are:
8+
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
11+
12+
Some great information on why this is important can be found at [keepachangelog.com](https://keepachangelog.com/en/1.1.0/), but the overall
1713
guiding principle here is that changelogs are for humans, not machines.
1814

1915
When reviewing merged PR's the labels to be used are:
2016

21-
* breaking - Used when the PR is considered a breaking change.
22-
* enhancement - Used when the PR adds a new feature or enhancement.
23-
* bug - Used when the PR fixes a bug included in a previous release.
24-
* documentation - Used when the PR adds or updates documentation.
25-
* internal - Used for internal changes that still require a mention in the
26-
changelog/release notes.
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.
2722

23+
**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`
2824

2925
## Release
3026

31-
Once the prep work is completed, the actual release is straight forward:
32-
33-
* First, ensure that you have installed your projects dependencies:
34-
35-
```
36-
pnpm install
37-
```
38-
39-
* Second, ensure that you have obtained a
40-
[GitHub personal access token][generate-token] with the `repo` scope (no
41-
other permissions are needed). Make sure the token is available as the
42-
`GITHUB_AUTH` environment variable.
43-
44-
For instance:
45-
46-
```bash
47-
export GITHUB_AUTH=abc123def456
48-
```
49-
50-
[generate-token]: https://github.com/settings/tokens/new?scopes=repo&description=GITHUB_AUTH+env+variable
51-
52-
* And last (but not least 😁) do your release.
53-
54-
```
55-
npx release-it
56-
```
57-
58-
[release-it](https://github.com/release-it/release-it/) manages the actual
59-
release process. It will prompt you to to choose the version number after which
60-
you will have the chance to hand tweak the changelog to be used (for the
61-
`CHANGELOG.md` and GitHub release), then `release-it` continues on to tagging,
62-
pushing the tag and commits, etc.
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/emberjs/ember-inspector/pulls?q=is%3Apr+is%3Aopen+%22Prepare+Release%22+in%3Atitle) PR

0 commit comments

Comments
 (0)