-
Notifications
You must be signed in to change notification settings - Fork 81
61 lines (59 loc) · 1.82 KB
/
submit.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
name: "Submit to Web Stores"
on:
workflow_dispatch:
inputs:
channel:
description: 'Release channel to publish to'
required: true
type: choice
options:
- staging
- production
default: staging
env:
CHANNEL: ${{ github.event.inputs.channel || 'staging' }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache pnpm modules
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
- uses: pnpm/[email protected]
with:
version: latest
run_install: true
- name: Use Node.js 18.x
uses: actions/[email protected]
with:
node-version: 18.x
cache: "pnpm"
- name: Build the extension (Chrome)
run: pnpm plasmo build --target=chrome-mv3
- name: Build the extension (Firefox)
run: pnpm plasmo build --target=firefox-mv2
- name: Package the extension into zip artifacts
run: |
pnpm package --target=chrome-mv3
pnpm package --target=firefox-mv2
- name: Browser Platform Publish (staging)
uses: PlasmoHQ/bpp@v3
if: env.CHANNEL == 'staging'
with:
keys: ${{ secrets.SUBMIT_KEYS_STAGING }}
verbose: true
chrome-file: build/chrome-mv3-prod.zip
firefox-file: build/firefox-mv2-prod.zip
- name: Browser Platform Publish (production)
uses: PlasmoHQ/bpp@v3
if: env.CHANNEL == 'production'
with:
keys: ${{ secrets.SUBMIT_KEYS_PRODUCTION }}
verbose: true
chrome-file: build/chrome-mv3-prod.zip
firefox-file: build/firefox-mv2-prod.zip