Skip to content

Commit fd7b428

Browse files
authored
Add workflows (#439)
* Update and rename publish.yml to publish-chrome.yml * Create publich-edge.yml * Create publish-firefox.yml
1 parent fcacb50 commit fd7b428

File tree

4 files changed

+96
-43
lines changed

4 files changed

+96
-43
lines changed

.github/workflows/publich-edge.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish to Edge Addon Store
2+
on:
3+
push:
4+
branches:
5+
- "release"
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
with:
12+
fetch-depth: 0
13+
- name: Add release branch
14+
run: |
15+
git fetch -a
16+
git branch release origin/release
17+
- name: Setup NodeJS
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: "v20.11.0"
21+
- name: Install dependencies
22+
run: npm install
23+
- name: Build
24+
run: npm run build
25+
- name: Upload
26+
uses: wdzeng/edge-addon@v2
27+
with:
28+
zip-path: market_packages/target.zip
29+
product-id: 2a99ae83-5ec8-4ad2-aa63-9a276fc708ce
30+
client-id: ${{ secrets.EDGE_CLIENT_ID }}
31+
api-key: ${{ secrets.EDGE_API_KEY}}
32+
upload-only: false
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Publish to Chrome Webstore
2+
on:
3+
push:
4+
branches:
5+
- "release"
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
with:
12+
fetch-depth: 0
13+
- name: Add release branch
14+
run: |
15+
git fetch -a
16+
git branch release origin/release
17+
- name: Setup NodeJS
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: "v20.11.0"
21+
- name: Install dependencies
22+
run: npm install
23+
- name: Build
24+
run: npm run build
25+
- name: Upload
26+
uses: mnao305/chrome-extension-upload@v5.0.0
27+
with:
28+
file-path: market_packages/target.zip
29+
extension-id: dkdhhcbjijekmneelocdllcldcpmekmm
30+
client-id: ${{ secrets.CHROME_CLIENT_ID }}
31+
client-secret: ${{ secrets.CHROME_CLIENT_SECRET }}
32+
refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }}
33+
publish: true
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish to Firefox Addon Store
2+
on:
3+
push:
4+
branches:
5+
- "release"
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
with:
12+
fetch-depth: 0
13+
- name: Add release branch
14+
run: |
15+
git fetch -a
16+
git branch release origin/release
17+
- name: Setup NodeJS
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: "v20.11.0"
21+
- name: Install dependencies
22+
run: npm install
23+
- name: Build
24+
run: npm run build:firefox
25+
- name: Upload to Firefox addon store
26+
uses: wdzeng/firefox-addon@v1
27+
with:
28+
addon-guid: "{7b312f5e-9680-436b-acc1-9b09f60e8aaa}"
29+
xpi-path: market_packages/target.firefox.zip
30+
jwt-issuer: ${{ secrets.FIREFOX_JWD_ISSUER }}
31+
jwt-secret: ${{ secrets.FIREFOX_JWD_SECRET }}

.github/workflows/publish.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)