1
- name : " Submit to Web Store "
1
+ name : " Submit to Web Stores "
2
2
on :
3
3
workflow_dispatch :
4
+ inputs :
5
+ channel :
6
+ description : ' Release channel to publish to'
7
+ required : true
8
+ type : choice
9
+ options :
10
+ - staging
11
+ - production
12
+ default : staging
4
13
push :
5
14
branches :
6
- - master
15
+ - main
16
+
17
+ env :
18
+ CHANNEL : ${{ github.event.inputs.channel || 'staging' }}
7
19
8
20
jobs :
9
21
build :
@@ -21,17 +33,32 @@ jobs:
21
33
with :
22
34
version : latest
23
35
run_install : true
24
- - name : Use Node.js 16 .x
36
+ - name : Use Node.js 18 .x
25
37
26
38
with :
27
- node-version : 16 .x
39
+ node-version : 18 .x
28
40
cache : " pnpm"
29
- - name : Build the extension
30
- run : pnpm build
31
- - name : Package the extension into a zip artifact
32
- run : pnpm package
33
- - name : Browser Platform Publish
41
+ - name : Build the extension (Chrome)
42
+ run : pnpm plasmo build --target=chrome-mv3
43
+ - name : Build the extension (Firefox)
44
+ run : pnpm plasmo build --target=firefox-mv2
45
+ - name : Package the extension into zip artifacts
46
+ run : |
47
+ pnpm package --target=chrome-mv3
48
+ pnpm package --target=firefox-mv2
49
+ - name : Browser Platform Publish (staging)
50
+ uses : PlasmoHQ/bpp@v3
51
+ if : env.CHANNEL == 'staging'
52
+ with :
53
+ keys : ${{ secrets.SUBMIT_KEYS_STAGING }}
54
+ verbose : true
55
+ chrome-file : build/chrome-mv3-prod.zip
56
+ firefox-file : build/firefox-mv2-prod.zip
57
+ - name : Browser Platform Publish (production)
34
58
uses : PlasmoHQ/bpp@v3
59
+ if : env.CHANNEL == 'production'
35
60
with :
36
- keys : ${{ secrets.SUBMIT_KEYS }}
37
- artifact : build/chrome-mv3-prod.zip
61
+ keys : ${{ secrets.SUBMIT_KEYS_PRODUCTION }}
62
+ verbose : true
63
+ chrome-file : build/chrome-mv3-prod.zip
64
+ firefox-file : build/firefox-mv2-prod.zip
0 commit comments