[CI] Enable minified builds (WIP)
This commit is contained in:
parent
a0c7f0d0cd
commit
0b8905cd0d
1 changed files with 12 additions and 12 deletions
24
.github/workflows/release_nightly.yml
vendored
24
.github/workflows/release_nightly.yml
vendored
|
@ -31,17 +31,17 @@ jobs:
|
|||
rm -rf src/package-lock.json src/node_modules/.package-lock.json src/splash/splashScreen.js.self src/node_modules/**/package.json src/node_modules/**/*.md src/node_modules/**/.*.yml src/node_modules/**/.npmignore src/node_modules/**/LICENSE src/node_modules/**/test*
|
||||
npx asar pack src app.asar
|
||||
|
||||
# - name: Pack minified asar
|
||||
# run: |
|
||||
# npm i -g esbuild uglifyjs minify-json
|
||||
# npx esbuild ./src --bundle --platform=node --external:electron --external:original-fs --external:auto-updater --outfile=index.js
|
||||
# npx uglifyjs --compress --mangle -o index.js -- index.js
|
||||
# cp src/package.json .
|
||||
# npx minify-json package.json
|
||||
# rm -rf src/*
|
||||
# cp index.js src
|
||||
# cp package.json src
|
||||
# npx asar pack src minified.asar
|
||||
- name: Pack minified asar
|
||||
run: |
|
||||
npm i -g esbuild uglifyjs minify-json
|
||||
npx esbuild ./src --bundle --platform=node --external:electron --external:original-fs --external:auto-updater --outfile=index.js
|
||||
npx uglifyjs --compress --mangle -o index.js -- index.js
|
||||
cp src/package.json .
|
||||
npx minify-json package.json
|
||||
rm -rf src/*
|
||||
cp index.js src
|
||||
cp package.json src
|
||||
npx asar pack src minified.asar
|
||||
|
||||
- name: GitHub Release
|
||||
run: |
|
||||
|
@ -51,4 +51,4 @@ jobs:
|
|||
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
||||
VERSION: 'nightly'
|
||||
NAME: 'Nightly'
|
||||
FILES: app.asar
|
||||
FILES: app.asar minified.asar
|
Loading…
Reference in a new issue