Skip to content

Commit a817edf

Browse files
committed
add publish workflow
1 parent 790bdbc commit a817edf

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/publish.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Publish to Chrome Web Store
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Create extension zip
15+
run: |
16+
zip -r extension.zip \
17+
manifest.json \
18+
content.js \
19+
icon16.png \
20+
icon48.png \
21+
icon128.png
22+
23+
- name: Upload artifact
24+
uses: actions/upload-artifact@v4
25+
with:
26+
name: extension
27+
path: extension.zip
28+
29+
publish:
30+
needs: build
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Download artifact
34+
uses: actions/download-artifact@v4
35+
with:
36+
name: extension
37+
38+
- name: Upload to Chrome Web Store
39+
uses: mnao305/chrome-extension-upload@v5.0.0
40+
with:
41+
file-path: extension.zip
42+
extension-id: ${{ secrets.CHROME_EXTENSION_ID }}
43+
client-id: ${{ secrets.CHROME_CLIENT_ID }}
44+
client-secret: ${{ secrets.CHROME_CLIENT_SECRET }}
45+
refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }}

0 commit comments

Comments
 (0)