Skip to content

Commit

Permalink
feat: 支持打包zip,工作流自动提交
Browse files Browse the repository at this point in the history
  • Loading branch information
draco-china committed Jul 3, 2023
1 parent 9dee2d9 commit fe36ff7
Show file tree
Hide file tree
Showing 7 changed files with 341 additions and 73 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/submit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: 'Submit to Web Store'
on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Cache pnpm modules
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
- uses: pnpm/action-setup@v2.2.4
with:
version: latest
run_install: true
- name: Use Node.js 16.x
uses: actions/setup-node@v3.4.1
with:
node-version: 16.x
cache: 'pnpm'
- name: Build the extension
run: pnpm build:plugin
- name: Package the extension into a zip artifact
run: pnpm zip
- name: Browser Platform Publish
uses: PlasmoHQ/bpp@v3
with:
keys: ${{ secrets.SUBMIT_KEYS }}
artifact: build/chrome-mv3-prod.zip
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
/src/.umi-test
/dist
.swc
/build
1 change: 1 addition & 0 deletions config/config.plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ import { defineConfig } from 'umi';
export default defineConfig({
publicPath: './',
history: { type: 'hash' },
outputPath: 'build/chrome-mv3-prod',
});
60 changes: 33 additions & 27 deletions config/icons.ts
Original file line number Diff line number Diff line change
@@ -1,36 +1,42 @@
/*
* @Module: module.name
* @Description: your description
* @Author: draco
* @Email: draco.coder@gmail.com
* @Github: https://github.com/draco-china
* @Date: 2023-06-29 15:31:30
* @LastEditTime: 2023-06-29 15:31:30
*/
export default {
autoInstall: {},
alias: {
apple: 'raphael:apple',
loading: 'icon-park-solid:loading-three',
windows: 'fa:windows',
'action-center': 'local:action-center',
full: 'local:full',
'exit-full': 'local:exit-full',
loading: 'local:loading-three',
switch: 'local:action-center',
apple: 'simple-icons:apple',
bing: 'simple-icons:microsoftbing',
google: 'simple-icons:google',
baidu: 'simple-icons:baidu',
yahoo: 'simple-icons:yahoo',
wikipedia: 'simple-icons:wikipedia',
qwant: 'simple-icons:quora',
windows: 'mdi:microsoft-windows',
system: 'local:system',
light: 'line-md:moon-alt-to-sunny-outline-loop-transition',
dark: 'line-md:moon-alt-loop',
check: 'ic:baseline-check',
light: 'mdi:white-balance-sunny',
dark: 'mdi:weather-night',
check: 'mdi:check',
close: 'mdi:window-close',
minus: 'mdi:window-minimize',
},
include: [
'local:bing',
'local:google',
'local:baidu',
'local:yahoo',
'local:wikipedia',
'local:qwant',
'fa:windows',
'local:action-center',
'simple-icons:apple',
'simple-icons:microsoftbing',
'simple-icons:google',
'simple-icons:baidu',
'simple-icons:yahoo',
'simple-icons:wikipedia',
'simple-icons:quora',
'mdi:microsoft-windows',
'mdi:white-balance-sunny',
'mdi:weather-night',
'mdi:check',
'mdi:window-close',
'mdi:window-minimize',
'local:system',
'line-md:moon-alt-to-sunny-outline-loop-transition',
'line-md:moon-alt-loop',
'ic:baseline-check',
'local:action-center',
'local:full',
'local:exit-full',
],
};
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"lint": "umi lint --fix",
"prepare": "husky install",
"setup": "umi setup",
"start": "npm run dev"
"start": "npm run dev",
"zip": "node ./scripts/compress2zip.js"
},
"dependencies": {
"@hookform/resolvers": "^3.1.1",
Expand Down Expand Up @@ -50,6 +51,7 @@
"lucide-react": "^0.252.0",
"react-day-picker": "^8.8.0",
"react-hook-form": "^7.45.1",
"react-rnd": "^10.4.1",
"react-sortablejs": "^6.1.4",
"tailwind-merge": "^1.13.2",
"tailwindcss-animate": "^1.0.6",
Expand All @@ -58,11 +60,8 @@
"zod": "^3.21.4"
},
"devDependencies": {
"@iconify-json/fa": "1.1.4",
"@iconify-json/ic": "1.1.13",
"@iconify-json/icon-park-solid": "1.1.9",
"@iconify-json/line-md": "1.1.25",
"@iconify-json/raphael": "1.1.4",
"@iconify-json/mdi": "1.1.52",
"@iconify-json/simple-icons": "1.1.58",
"@types/chrome": "^0.0.239",
"@types/react": "^18.2.14",
"@types/react-dom": "^18.2.6",
Expand Down
Loading

0 comments on commit fe36ff7

Please sign in to comment.