-
Notifications
You must be signed in to change notification settings - Fork 12
42 lines (42 loc) · 1.56 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: ci
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
- run: npm ci
- name: Build extension
run: npm run build
env:
SENTRY_DSN: ${{ vars.SENTRY_DSN }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
- run: |
jq --arg version "$VERSION" '.version=$version' dist/manifest.json > manifest.tmp.json \
&& mv manifest.tmp.json dist/manifest.json
jq --arg version "$VERSION" '.version=$version' dist/manifest.firefox.json > manifest.tmp.json \
&& mv manifest.tmp.json dist/manifest.firefox.json
env:
VERSION: ${{ github.event.release.tag_name }}
- run: |
cp -r dist dist-firefox
cp dist-firefox/manifest.firefox.json dist-firefox/manifest.json
- name: Publish to Chrome
working-directory: dist
run: npx chrome-webstore-upload-cli@2 upload --auto-publish
env:
EXTENSION_ID: "gedikamndpbemklijjkncpnolildpbgo"
CLIENT_ID: ${{ secrets.GOOGLE_WEB_STORE_CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.GOOGLE_WEB_STORE_CLIENT_SECRET }}
REFRESH_TOKEN: ${{ secrets.GOOGLE_WEB_STORE_REFRESH_TOKEN }}
- name: Publish to Firefox
working-directory: dist-firefox
run: npx web-ext-submit@7
env:
WEB_EXT_API_KEY: ${{ secrets.WEB_EXT_JWT_ISSUER }}
WEB_EXT_API_SECRET: ${{ secrets.WEB_EXT_JWT_SECRET }}