-
Notifications
You must be signed in to change notification settings - Fork 1
79 lines (64 loc) · 2.37 KB
/
publish.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Publish
on:
workflow_dispatch:
jobs:
build-chrome:
name: Build Chrome extension
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Setup Bun environment
uses: oven-sh/setup-bun@v1
with:
bun-version: 0.7.0
- name: Install dependencies
run: bun install
- name: Build Chrome
run: bun run build
- name: Zip Chrome extension
run: |
cd dist
zip -r ../chrome_extension.zip .
- name: Upload Chrome extension artifacts
uses: actions/upload-artifact@v4
with:
name: better-studres-chrome
path: chrome_extension.zip
- name: Publish to Chrome Web Store
uses: fregante/setup-chrome-webstore@v1
with:
client_id: ${{ secrets.CHROME_EXTENSION_CLIENT_ID }}
client_secret: ${{ secrets.CHROME_EXTENSION_CLIENT_SECRET }}
refresh_token: ${{ secrets.CHROME_EXTENSION_REFRESH_TOKEN }}
extension_id: kamnhbpjhhhjlbandgpngdnplledombg
source: chrome_extension.zip
env:
WEBSTORE_CLIENT_ID: ${{ secrets.CHROME_EXTENSION_CLIENT_ID }}
WEBSTORE_CLIENT_SECRET: ${{ secrets.CHROME_EXTENSION_CLIENT_SECRET }}
WEBSTORE_REFRESH_TOKEN: ${{ secrets.CHROME_EXTENSION_REFRESH_TOKEN }}
build-firefox:
name: Build Firefox extension
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Setup Bun environment
uses: oven-sh/setup-bun@v1
with:
bun-version: 0.7.0
- name: Install dependencies
run: bun install
- name: Build Firefox
run: bun run build:firefox
- name: Upload Firefox extension artifacts
uses: actions/upload-artifact@v4
with:
name: better-studres-firefox
path: dist/