-
Notifications
You must be signed in to change notification settings - Fork 10
76 lines (72 loc) · 2.2 KB
/
publish.yaml
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
71
72
73
74
75
76
name: Publish
on:
release:
types: [ published ]
workflow_dispatch:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- run: flutter --version
- name: Install dependencies
run: flutter pub get
- name: Update version
run: dart scripts/update_version.dart
- name: Build
run: flutter build web --release --web-renderer html --csp
- name: Add LICENSE
run: cp LICENSE build/web
- name: Install ZIP tool
run: sudo apt-get install zip
- name: Archive
run: |
cd build
zip -r extension.zip web
cd ..
- name: Upload job artifact
uses: actions/upload-artifact@v3
with:
path: build/extension.zip
publish_chrome:
needs: [ build ]
runs-on: ubuntu-latest
steps:
- name: Download job artifact
uses: actions/[email protected]
with:
path: dist
- name: Display structure of downloaded files
run: ls -R dist
- name: Chrome Extension upload & publish
uses: Passiverecords/[email protected]
with:
refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }}
client-id: ${{ secrets.CHROME_CLIENT_ID }}
client-secret: ${{ secrets.CHROME_CLIENT_SECRET }}
file-name: dist/artifact/extension.zip
app-id: ${{ secrets.CHROME_APP_ID }}
publish: true
publish_edge:
needs: [ build ]
runs-on: ubuntu-latest
steps:
- name: Download job artifact
uses: actions/[email protected]
with:
path: dist
- name: Display structure of downloaded files
run: ls -R dist
- name: Edge Add-on upload & publish
uses: wdzeng/edge-addon@v1
with:
product-id: ${{ secrets.EDGE_PRODUCT_ID }}
zip-path: dist/artifact/extension.zip
client-id: ${{ secrets.EDGE_CLIENT_ID }}
client-secret: ${{ secrets.EDGE_CLIENT_SECRET }}
access-token-url: ${{ secrets.EDGE_ACCESS_TOKEN_URL }}