File tree Expand file tree Collapse file tree 1 file changed +16
-11
lines changed
Expand file tree Collapse file tree 1 file changed +16
-11
lines changed Original file line number Diff line number Diff line change @@ -13,25 +13,30 @@ jobs:
1313 - name : Checkout code
1414 uses : actions/checkout@v4
1515
16- - name : Install zip tool
17- run : sudo apt-get install -y zip
16+ - name : Set up Node.js
17+ uses : actions/setup-node@v4
18+ with :
19+ node-version : ' 18' # or '20' if your project requires it
20+
21+ - name : Install dependencies
22+ run : sudo apt-get install -y zip rsync
1823
1924 - name : Restore private key
2025 run : echo "${{ secrets.CHROME_PRIVATE_KEY }}" | base64 -d > key.pem
2126
22- - name : Zip extension
23- run : |
24- mkdir -p dist
25- zip -r dist/extension.zip . -x ".git/*" ".github/*" "node_modules/*" "*.pem" "dist/*"
26-
27- - name : Install CRX packer
27+ - name : Install CRX CLI
2828 run : npm install -g crx
2929
30- - name : Build CRX
30+ - name : Copy extension files into build folder
31+ run : |
32+ mkdir -p dist/src
33+ rsync -av --exclude='node_modules' --exclude='dist' --exclude='.git' --exclude='*.pem' . dist/src
34+
35+ - name : Build CRX file
3136 run : |
32- crx pack dist/extension.zip -o dist/extension.crx -p key.pem
37+ crx pack dist/src -o dist/extension.crx -p key.pem
3338
34- - name : Upload CRX
39+ - name : Upload CRX file as artifact
3540 uses : actions/upload-artifact@v4
3641 with :
3742 name : chrome-extension
You can’t perform that action at this time.
0 commit comments