Skip to content

Commit bcb59cb

Browse files
feat: Add Bundle analysis (#116)
Adds a new ci.yml workflow to build and upload bundle stats to Codecov. Renames old ci.yml to publish.yml.
1 parent 76cc43e commit bcb59cb

File tree

5 files changed

+772
-92
lines changed

5 files changed

+772
-92
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,18 @@
11
name: ci
2-
on:
3-
release:
4-
types: [published]
2+
3+
permissions:
4+
id-token: write
5+
6+
on: push
7+
58
jobs:
6-
publish:
9+
ci:
710
runs-on: ubuntu-latest
811
steps:
912
- uses: actions/checkout@v3
1013
- uses: actions/setup-node@v3
1114
with:
12-
node-version: '18.x'
15+
node-version: "22"
1316
- run: npm ci
1417
- name: Build extension
1518
run: npm run build
16-
env:
17-
SENTRY_DSN: ${{ vars.SENTRY_DSN }}
18-
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
19-
- run: |
20-
jq --arg version "$VERSION" '.version=$version' dist/manifest.json > manifest.tmp.json \
21-
&& mv manifest.tmp.json dist/manifest.json
22-
jq --arg version "$VERSION" '.version=$version' dist/manifest.firefox.json > manifest.tmp.json \
23-
&& mv manifest.tmp.json dist/manifest.firefox.json
24-
env:
25-
VERSION: ${{ github.event.release.tag_name }}
26-
- run: |
27-
cp -r dist dist-firefox
28-
cp dist-firefox/manifest.firefox.json dist-firefox/manifest.json
29-
- name: Publish to Chrome
30-
working-directory: dist
31-
run: npx chrome-webstore-upload-cli@2 upload --auto-publish
32-
env:
33-
EXTENSION_ID: "gedikamndpbemklijjkncpnolildpbgo"
34-
CLIENT_ID: ${{ secrets.GOOGLE_WEB_STORE_CLIENT_ID }}
35-
CLIENT_SECRET: ${{ secrets.GOOGLE_WEB_STORE_CLIENT_SECRET }}
36-
REFRESH_TOKEN: ${{ secrets.GOOGLE_WEB_STORE_REFRESH_TOKEN }}
37-
- name: Publish to Firefox
38-
working-directory: dist-firefox
39-
run: npx web-ext-submit@7
40-
env:
41-
WEB_EXT_API_KEY: ${{ secrets.WEB_EXT_JWT_ISSUER }}
42-
WEB_EXT_API_SECRET: ${{ secrets.WEB_EXT_JWT_SECRET }}

.github/workflows/publish.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: publish
2+
3+
permissions:
4+
id-token: write
5+
6+
on:
7+
release:
8+
types: [published]
9+
10+
jobs:
11+
publish:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
- uses: actions/setup-node@v3
16+
with:
17+
node-version: "22"
18+
- run: npm ci
19+
- name: Build extension
20+
run: npm run build
21+
env:
22+
SENTRY_DSN: ${{ vars.SENTRY_DSN }}
23+
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
24+
- run: |
25+
jq --arg version "$VERSION" '.version=$version' dist/manifest.json > manifest.tmp.json \
26+
&& mv manifest.tmp.json dist/manifest.json
27+
jq --arg version "$VERSION" '.version=$version' dist/manifest.firefox.json > manifest.tmp.json \
28+
&& mv manifest.tmp.json dist/manifest.firefox.json
29+
env:
30+
VERSION: ${{ github.event.release.tag_name }}
31+
- run: |
32+
cp -r dist dist-firefox
33+
cp dist-firefox/manifest.firefox.json dist-firefox/manifest.json
34+
- name: Publish to Chrome
35+
working-directory: dist
36+
run: npx chrome-webstore-upload-cli@2 upload --auto-publish
37+
env:
38+
EXTENSION_ID: "gedikamndpbemklijjkncpnolildpbgo"
39+
CLIENT_ID: ${{ secrets.GOOGLE_WEB_STORE_CLIENT_ID }}
40+
CLIENT_SECRET: ${{ secrets.GOOGLE_WEB_STORE_CLIENT_SECRET }}
41+
REFRESH_TOKEN: ${{ secrets.GOOGLE_WEB_STORE_REFRESH_TOKEN }}
42+
- name: Publish to Firefox
43+
working-directory: dist-firefox
44+
run: npx web-ext-submit@7
45+
env:
46+
WEB_EXT_API_KEY: ${{ secrets.WEB_EXT_JWT_ISSUER }}
47+
WEB_EXT_API_SECRET: ${{ secrets.WEB_EXT_JWT_SECRET }}

0 commit comments

Comments
 (0)