Browse Source

chore: timely executable build action related bugs

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/9245/head
Pranav C 3 months ago
parent
commit
0f469ade16
  1. 59
      .github/workflows/release-timely-executables.yml

59
.github/workflows/release-timely-executables.yml

@ -81,7 +81,7 @@ jobs:
- name : Install dependencies and build executables - name : Install dependencies and build executables
run: | run: |
# install npm dependendencies # install npm dependencies
npm i npm i
# Copy sqlite binaries # Copy sqlite binaries
@ -96,17 +96,52 @@ jobs:
./node_modules/.bin/node-pre-gyp install --directory=./node_modules/sqlite3 --target_platform=linux --fallback-to-build --target_arch=arm64 --target_libc=glibc ./node_modules/.bin/node-pre-gyp install --directory=./node_modules/sqlite3 --target_platform=linux --fallback-to-build --target_arch=arm64 --target_libc=glibc
./node_modules/.bin/node-pre-gyp install --directory=./node_modules/sqlite3 --target_platform=linux --fallback-to-build --target_arch=x64 --target_libc=musl ./node_modules/.bin/node-pre-gyp install --directory=./node_modules/sqlite3 --target_platform=linux --fallback-to-build --target_arch=x64 --target_libc=musl
./node_modules/.bin/node-pre-gyp install --directory=./node_modules/sqlite3 --target_platform=linux --fallback-to-build --target_arch=arm64 --target_libc=musl ./node_modules/.bin/node-pre-gyp install --directory=./node_modules/sqlite3 --target_platform=linux --fallback-to-build --target_arch=arm64 --target_libc=musl
# ./node_modules/.bin/node-pre-gyp install --directory=./node_modules/sqlite3 --target_platform=linux --fallback-to-build --target_arch=armv6 --target_libc=unknown
# ./node_modules/.bin/node-pre-gyp install --directory=./node_modules/sqlite3 --target_platform=linux --fallback-to-build --target_arch=armv7 --target_libc=unknown mkdir ./mac-dist
mkdir ./dist
# build darwin x64 executable
npm uninstall sharp
npm install --cpu=x64 --os=darwin sharp
npx --yes pkg@5.8.1 . --compress GZip -t node18-macos-x64 -o Noco-macos-x64
mv ./Noco-macos-x64 ./mac-dist/
# build darwin arm64 executable
npm uninstall sharp
npm install --cpu=arm64 --os=darwin sharp
npx --yes pkg@5.8.1 . --compress GZip -t node18-macos-arm64 -o Noco-macos-arm64
mv ./Noco-macos-arm64 ./mac-dist/
# build linux x64 executable
npm uninstall sharp
npm install --cpu=x64 --os=linux sharp
npx --yes pkg@5.8.1 . --compress GZip -t node18-linux-x64 -o Noco-linux-x64
mv ./Noco-linux-x64 ./dist/
# build linux arm64 executable
npm uninstall sharp
npm install --cpu=arm64 --os=linux sharp
npx --yes pkg@5.8.1 . --compress GZip -t node18-linux-arm64 -o Noco-linux-arm64
mv ./Noco-linux-arm64 ./dist/
# build windows x64 executable
npm uninstall sharp
npm install --cpu=x64 --os=win32 sharp
npx --yes pkg@5.8.1 . --compress GZip -t node18-win-x64 -o Noco-win-x64.exe
mv ./Noco-win-x64.exe ./dist/
# build windows arm64 executable
npm uninstall sharp
npm install --cpu=arm64 --os=win32 sharp
npx --yes pkg@5.8.1 . --compress GZip -t node18-win-arm64 -o Noco-win-arm64.exe
mv ./Noco-win-arm64.exe ./dist/
# clean up code to optimize size # clean up code to optimize size
npx modclean --patterns="default:*" --ignore="nc-lib-gui-daily/**,nocodb-daily/**,dayjs/**,express-status-monitor/**,sqlite3/**" --run npx modclean --patterns="default:*" --ignore="nc-lib-gui-daily/**,nocodb-daily/**,dayjs/**,express-status-monitor/**,sqlite3/**" --run
# build executables
npm run build
mkdir ./mac-dist mkdir ./mac-dist
mv ./dist/Noco-macos-arm64 ./mac-dist/ mv ./dist/Noco-macos-arm64 ./mac-dist/
mv ./dist/Noco-macos-x64 ./mac-dist/ mv ./dist/Noco-macos-x64 ./mac-dist/
@ -144,7 +179,7 @@ jobs:
- uses: actions/upload-artifact@master - uses: actions/upload-artifact@master
with: with:
name: ${{ github.event.inputs.tag || inputs.tag }} name: ${{ format('{0}-signed', github.event.inputs.tag || inputs.tag) }}
path: mac-dist path: mac-dist
retention-days: 1 retention-days: 1
@ -155,7 +190,7 @@ jobs:
steps: steps:
- uses: actions/download-artifact@master - uses: actions/download-artifact@master
with: with:
name: ${{ github.event.inputs.tag || inputs.tag }} name: ${{ format('{0}-signed', github.event.inputs.tag || inputs.tag) }}
path: mac-dist path: mac-dist
- name: Upload mac executables to release - name: Upload mac executables to release

Loading…
Cancel
Save