forked from web-scrobbler/web-scrobbler
-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (79 loc) · 2.58 KB
/
deploy.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: Deploy
on:
push:
tags:
- 'v*.*.*'
jobs:
deploy-chrome:
name: Deploy Chrome extension
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Create zipball
run: npm run dist chrome
- name: Publish the extension for Chrome
uses: trmcnvn/chrome-addon@v2
with:
extension: hhinaapppaileiechjoiifaancjggfjm
zip: web-scrobbler-chrome.zip
client-id: ${{ secrets.CHROME_CLIENT_ID }}
client-secret: ${{ secrets.CHROME_CLIENT_SECRET }}
refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }}
deploy-firefox:
name: Deploy Firefox extension
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Create zipball
run: npm run dist firefox
- name: Publish the extension for Firefox
uses: yayuyokitano/[email protected]
with:
api_key: ${{ secrets.AMO_ISSUER }}
api_secret: ${{ secrets.AMO_SECRET }}
guid: '{799c0914-748b-41df-a25c-22d008f9e83f}'
xpi_path: web-scrobbler-firefox.zip
src_path: web-scrobbler-src.zip
deploy-edge:
name: Deploy Edge extension
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Create zipball
run: npm run dist chrome
- name: Get version from package
run: echo "PACKAGE_VERSION=$(jq .version package.json -r)" >> $GITHUB_ENV
- name: Publish the extension for Edge
uses: inverse/[email protected]
with:
product_id: ${{ secrets.EDGE_PRODUCT_ID }}
client_id: ${{ secrets.EDGE_CLIENT_ID }}
client_secret: ${{ secrets.EDGE_CLIENT_SECRET }}
access_token_url: ${{ secrets.EDGE_ACCESS_TOKEN_URL }}
zip: web-scrobbler-chrome.zip # Compatible with Chrome
notes: 'Version ${{ env.PACKAGE_VERSION }} upload'
debug: true