-
Notifications
You must be signed in to change notification settings - Fork 1
70 lines (55 loc) · 1.75 KB
/
cd_chrome.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
name: CD_chrome
on:
push:
tags:
- 'v*'
workflow_dispatch:
env:
FLUTTER_CHANNEL: "stable"
jobs:
chrome_e:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Read .nvmrc
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
id: nvm
- name: Use Node.js (.nvmrc)
uses: actions/setup-node@v1
with:
node-version: "${{ steps.nvm.outputs.NVMRC }}"
- name: Install NPM dependencies
run: npm install
- name: Build with Webpack
run: npm run build
# Setup the flutter environment.
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: ${{env.FLUTTER_CHANNEL}}
cache: true
- name: Flutter version
run: flutter --version
- name: Install dependencies and generate files
run: make gen
- name: Build the Flutter Chrome extension
run: flutter build web --web-renderer html --csp --release
- name: Zip build
uses: papeloto/action-zip@v1
with:
files: build/web/
dest: ribn_chrome_ext.zip
- name: Upload draft to Chrome Web Store dev portal
run: sh ./.github/scripts/upload_chrome_ext.sh
env:
EXTENSION_CLIENT_ID: ${{ secrets.EXTENSION_CLIENT_ID }}
EXTENSION_CLIENT_SECRET: ${{ secrets.EXTENSION_CLIENT_SECRET }}
EXTENSION_REFRESH_TOKEN: ${{ secrets.EXTENSION_REFRESH_TOKEN }}
EXTENSION_PATH: ribn_chrome_ext.zip
EXTENSION_ID: ${{ secrets.EXTENSION_ID }}
- name: Upload extension build
uses: actions/upload-artifact@v3
with:
name: ribn_chrome_ext.zip
path: ribn_chrome_ext.zip