Skip to content

Commit 2b3c462

Browse files
committed
ci: automate publishing to chrome store
1 parent 21fc2bf commit 2b3c462

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,7 @@ jobs:
2727
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2828
UCI_GITHUB_TOKEN: ${{ secrets.UCI_GITHUB_TOKEN }}
2929
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
30+
client_id: ${{ secrets.CHROME_CLIENT }}
31+
client_secret: ${{ secrets.CHROME_CLIENT_SECRET }}
32+
refresh_token: ${{ secrets.CHROME_REFRESH_TOKEN }}
33+
extension_id: ${{ env.EXTENSION_ID }}

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@
1515
"scripts": {
1616
"sync-version": "node scripts/sync-version.mjs",
1717
"build": "npm run sync-version && tsc && cp src/manifest.json dist/ && cp src/popup.html dist/ && cp -r src/icons dist/",
18-
"package": "npm run build && web-ext build --source-dir=dist --artifacts-dir=. --filename=ipfs-quicklaunch-{version}.zip --overwrite-dest",
18+
"package": "npm run build && web-ext build --source-dir=dist --artifacts-dir=. --filename=ipfs-quicklaunch.zip --overwrite-dest",
19+
"publish:chrome-store": "npx cws-publish $CLIENT_ID $CLIENT_SECRET $REFRESH_TOKEN ipfs-quicklaunch.zip $EXTENSION_ID",
20+
"release": "aegir release && npm run publish:chrome-store",
1921
"start": "npm run build && web-ext run --source-dir=dist --target=chromium",
20-
"release": "aegir release",
2122
"watch": "tsc --watch",
22-
"clean": "rm -rf dist ipfs-quicklaunch-*.zip"
23+
"clean": "rm -rf dist ipfs-quicklaunch.zip"
2324
},
2425
"files": [
2526
"src",
@@ -137,6 +138,7 @@
137138
"devDependencies": {
138139
"@types/chrome": "^0.0.248",
139140
"aegir": "^47.0.20",
141+
"cws-publish": "^2.1.1",
140142
"typescript": "^5.0.0",
141143
"web-ext": "^8.3.0"
142144
},

0 commit comments

Comments
 (0)