-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (44 loc) · 1.27 KB
/
release.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
env:
DIRECTORY: dist
# FILE GENERATED WITH: npx ghat fregante/ghatemplates/webext
# SOURCE: https://github.com/fregante/ghatemplates
# OPTIONS: {"exclude":["on.schedule"]}
name: Release
on:
workflow_dispatch: null
jobs:
Submit:
if: github.event_name == 'workflow_dispatch'
strategy:
fail-fast: false
matrix:
command:
- firefox
- chrome
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: npm
- name: install
run: npm ci || npm install
- run: npm run build --if-present
- name: Submit
run: |
case ${{ matrix.command }} in
chrome)
cd $DIRECTORY && npx chrome-webstore-upload-cli@2 upload --auto-publish
;;
firefox)
cd $DIRECTORY && npx web-ext-submit@7
;;
esac
env:
EXTENSION_ID: ${{ secrets.EXTENSION_ID }}
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }}
WEB_EXT_API_KEY: ${{ secrets.WEB_EXT_API_KEY }}
WEB_EXT_API_SECRET: ${{ secrets.WEB_EXT_API_SECRET }}