-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (47 loc) · 1.39 KB
/
deploy-tag.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
name: Deployment
on:
push:
tags:
- "*.*.*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm install
- run: npm test
- name: Update extension’s meta
run: |
export VER=$(echo "$GITHUB_REF" | sed -e 's/refs\/tags\///')
echo https://github.com/$GITHUB_REPOSITORY/tree/$VER > distribution/SOURCE_URL
npm run version
- uses: actions/upload-artifact@v1
with:
name: built-extension
path: distribution
deploy-to-chrome:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v1
with:
name: built-extension
path: distribution
- run: cd distribution && npx chrome-webstore-upload-cli upload --auto-publish
env:
EXTENSION_ID: ${{ secrets.EXTENSION_ID }}
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }}
deploy-to-firefox:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v1
with:
name: built-extension
path: distribution
- run: cd distribution && npx web-ext-submit
env:
WEB_EXT_API_KEY: ${{ secrets.WEB_EXT_API_KEY }}
WEB_EXT_API_SECRET: ${{ secrets.WEB_EXT_API_SECRET }}