@@ -17,6 +17,123 @@ concurrency:
1717 cancel-in-progress : true
1818
1919jobs :
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/s3-sync-action@v0.5.1
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
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
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 :
0 commit comments